Key-Value structures: KV, Slice, Cache...
- Key-Value base storage structure.
- Non-blocking to write.
- sync.Map if >= go1.9.
KV(kv.go)
- Value is single instance.
Put(k string, v interface{})
Get(k string) (v interface{}, ok bool)
Slice(slice.go)
- Value is go slice structure.
Put(k string, v interface{})
Get(k string) (v []interface{}, ok bool)
Cache(cache.go)
- Value is single instance.
- Support expire time.
Put(k string, v interface{}, expire time.Duration)
Get(k string) (v interface{}, ok bool)
Welcome to pull requests, report bugs, suggest ideas and discuss mtoi on issues page.
If you like it then you can put a ⭐ on it.