Skip to content

jeffjen/go-libkv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-libkv

license GoDoc Build Status Join the chat at https://gitter.im/jeffjen/go-libkv

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.

libkv

Embedded In memory volatile KV storage inspired by REDIS.

Supported operations

  • Set, Setexp
  • Get
  • Getset
  • Getexp
  • Expire
  • TTL
  • Del
  • Lpush
  • Ltrim
  • Lrange
  • List, Listexp
  • Watch

Experimental feature:

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

timer

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.

About

An embedded framework for handling key value written in pure golang.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages