mirror of
https://github.com/mentos1386/zdravko.git
synced 2024-11-26 01:07:52 +00:00
14 lines
266 B
Go
14 lines
266 B
Go
|
package kv
|
||
|
|
||
|
import "time"
|
||
|
|
||
|
type KeyValueStore interface {
|
||
|
Close() error
|
||
|
|
||
|
Get(key string) ([]byte, error)
|
||
|
Set(key string, value []byte, ttl time.Duration) error
|
||
|
Increment(key string) (int, error)
|
||
|
Delete(key string) error
|
||
|
Keys(prefix string) ([]string, error)
|
||
|
}
|