An embedded framework for handling key value written in pure golang.
- Provides a straight forward interface for handling volatile key value storage
- Added flavor for time based resource management (EXPIRE, TTL)
- Broadcast key space event to subscribed goroutines.
Embedded In memory volatile KV storage inspired by REDIS.
- Set, Setexp
- Get
- Getset
- Getexp
- Expire
- TTL
- Del
- Lpush
- Ltrim
- Lrange
- List, Listexp
- Watch
Snapshot creation truncates current kv file object, so no version support.
-
Save
Takes a snapshot of the current kv object to disk. The rule of encoding follows golang package gob. -
Load
Loads snapshot from disk. -
IterateR
Move alone the keyspace and retrieve key value -
IterateW
Move alone the keyspace and send modify instructions along
Schedule work to run at specific time once, or repeat the task at set interval. It uses implementation in container/heap to setup min-heap on the TTL of the scheduled item.