zdravko/internal/kv/kv.go
Tine bb1ba5ed58
feat(keyvalue): add badger as keyvalue store
KeyValue store will be used by Incidents, so that the functions
can decide based on history not just on the event that triggered them.
2024-04-28 16:06:49 +02:00

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)
}