go-libkv

module
v0.0.0-...-5df59a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2015 License: MIT

README

go-libkv

license GoDoc Build Status

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.

Directories

Path Synopsis
Package libkv provides key value storage for embedded go application.
Package libkv provides key value storage for embedded go application.
Package timer provides basic schedule primitives for user defined methods to be engaged after set period.
Package timer provides basic schedule primitives for user defined methods to be engaged after set period.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL