trade/kv.go
2025-04-07 05:12:42 -06:00

21 lines
273 B
Go

package trade
type Store interface {
Get(string) any
Set(string, any)
Del(string)
}
type KV[t any] struct {
local map[string]t
store Store
peers []Server
}
func NewKV[t any](s Store) KV[t] {
res := KV[t]{
local: make(map[string]t),
store: s,
}
return res
}