summaryrefslogtreecommitdiff
path: root/plugins/kv/interface.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-06-22 15:20:08 +0300
committerValery Piashchynski <[email protected]>2021-06-22 15:20:08 +0300
commit5627146e45afbb8f6566862c60a42a0b0aad2d0a (patch)
tree731e4157c3c09dabab60bd2c78910facf23fce75 /plugins/kv/interface.go
parent1a2a1f4735e40675abf6cd9767c99374359ec2bb (diff)
- Move common interfaces and structures to the 'common' folder
- Update tests Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/kv/interface.go')
-rw-r--r--plugins/kv/interface.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/plugins/kv/interface.go b/plugins/kv/interface.go
deleted file mode 100644
index ffdbbe62..00000000
--- a/plugins/kv/interface.go
+++ /dev/null
@@ -1,36 +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 and boltdb
- TTL(keys ...string) (map[string]string, error)
-
- // Delete one or multiple keys.
- Delete(keys ...string) error
-}
-
-// Constructor provides storage based on the config
-type Constructor interface {
- // KVConstruct provides Storage based on the config key
- KVConstruct(key string) (Storage, error)
-}