summaryrefslogtreecommitdiff
path: root/common/kv
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-09-16 17:12:37 +0300
committerValery Piashchynski <[email protected]>2021-09-16 17:12:37 +0300
commitf3491c089b4da77fd8d2bc942a88b6b8d117a8a5 (patch)
tree32bfffb1f24eeee7b909747cc00a6a6b9fd3ee83 /common/kv
parent5d2cd55ab522d4f1e65a833f91146444465a32ac (diff)
Move plugins to a separate repository
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'common/kv')
-rw-r--r--common/kv/interface.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/common/kv/interface.go b/common/kv/interface.go
deleted file mode 100644
index bc6a07b2..00000000
--- a/common/kv/interface.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package kv
-
-import kvv1 "github.com/spiral/roadrunner/v2/proto/kv/v1beta"
-
-// Storage represents single abstract storage.
-type Storage interface {
- // Has checks if value exists.
- Has(keys ...string) (map[string]bool, error)
-
- // Get loads value content into a byte slice.
- Get(key string) ([]byte, error)
-
- // MGet loads content of multiple values
- // Returns the map with existing keys and associated values
- MGet(keys ...string) (map[string][]byte, error)
-
- // Set used to upload item to KV with TTL
- // 0 value in TTL means no TTL
- Set(items ...*kvv1.Item) error
-
- // MExpire sets the TTL for multiply keys
- MExpire(items ...*kvv1.Item) error
-
- // TTL return the rest time to live for provided keys
- // Not supported for the memcached
- TTL(keys ...string) (map[string]string, error)
-
- // Clear clean the entire storage
- Clear() error
-
- // Delete one or multiple keys.
- Delete(keys ...string) error
-
- // Stop the storage driver
- Stop()
-}
-
-// Constructor provides storage based on the config
-type Constructor interface {
- // KVConstruct provides Storage based on the config key
- KVConstruct(key string) (Storage, error)
-}