mirror of
https://github.com/mentos1386/zdravko.git
synced 2024-11-27 01:33:37 +00:00
Tine
bb1ba5ed58
KeyValue store will be used by Incidents, so that the functions can decide based on history not just on the event that triggered them.
13 lines
266 B
Go
13 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)
|
|
}
|