diff options
Diffstat (limited to 'plugins/kv/interface.go')
-rw-r--r-- | plugins/kv/interface.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/kv/interface.go b/plugins/kv/interface.go index c1367cdf..20dbb8b3 100644 --- a/plugins/kv/interface.go +++ b/plugins/kv/interface.go @@ -35,7 +35,15 @@ type Storage interface { // Delete one or multiple keys. Delete(keys ...string) error +} + +// StorageDriver interface provide storage +type StorageDriver interface { + Provider +} - // Close closes the storage and underlying resources. - Close() error +// Provider provides storage based on the config +type Provider interface { + // Provide provides Storage based on the config key + Provide(key string) (Storage, error) } |