easyKV is based on the backends of confd. easyKV provides a very simple interface to work with some key-value stores. The goal of easyKV is to abstract these 2 common operations for multiple backends:
A storage backend in easyKV
should implement (fully or partially) this interface:
type ReadWatcher interface {
GetValues(keys []string) (map[string]string, error)
WatchPrefix(ctx context.Context, prefix string, opts ...WatchOption) (uint64, error)
Close()
}
Calls | Consul | Etcdv2 | Etcdv3 | env | file | redis | vault | zookeeper | nats kv |
---|---|---|---|---|---|---|---|---|---|
GetValues | X | X | X | X | X | X | X | X | X |
WatchPrefix | X | X | X | X | X | X | |||
Close | X | X | X | X | X | X | X | X | X |