diff options
author | Valery Piashchynski <[email protected]> | 2021-04-22 22:03:59 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-04-22 22:03:59 +0300 |
commit | 91c1fa2e2693cb662425c1ba7cca2325a8458995 (patch) | |
tree | d97791a6675678f607396af5de81143e764ca108 /plugins/kv/interface.go | |
parent | 1e62c2afa4fe8b5bae0c26e72ae61ef6b5f0f54d (diff) |
- Rework storage drivers
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/kv/interface.go')
-rw-r--r-- | plugins/kv/interface.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/kv/interface.go b/plugins/kv/interface.go index 6c2a66f2..20dbb8b3 100644 --- a/plugins/kv/interface.go +++ b/plugins/kv/interface.go @@ -35,11 +35,15 @@ type Storage interface { // Delete one or multiple keys. Delete(keys ...string) error +} - // Close closes the storage and underlying resources. - Close() error +// StorageDriver interface provide storage +type StorageDriver interface { + Provider +} - // Configure used to configure storage - // key - yaml config key, for example kv.boltdb-north - Configure(key string) (Storage, error) +// Provider provides storage based on the config +type Provider interface { + // Provide provides Storage based on the config key + Provide(key string) (Storage, error) } |