leveldb

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeserializeBytes

func DeserializeBytes(b []byte, m interface{}) (err error)

DeserializeBytes converts the bytes to an object using gob decoder

func SerializeBytes

func SerializeBytes(m interface{}) (ret []byte, err error)

SerializeBytes serializa bytes using gob encoder and returns them

Types

type Config

type Config struct {
	// Path to leveldb database
	Path string
	// Options LevelDB open database options
	Options *Options
	// ReadOptions LevelDB read database options
	ReadOptions *ReadOptions
	// WriteOptions LevelDB write database options
	WriteOptions *WriteOptions
	// CleanTimeout Waiting between starting database cleaning and compression. Default one hour
	CleanTimeout time.Duration
	// MaxAge how much long the LevelDB should keep the session. Default 1 year
	MaxAge time.Duration
}

Config the leveldb configuration used inside sessions

type Interface

type Interface interface {
	// Load loads the values
	Load(string) map[string]interface{}
	// Update updates the store
	Update(string, map[string]interface{})
}

Interface is an interface

func New

func New(cfg ...Config) Interface

New returns a database interface

type Options

type Options opt.Options

Options LevelDB open database options

type ReadOptions

type ReadOptions opt.ReadOptions

ReadOptions LevelDB read database options

type WriteOptions

type WriteOptions opt.WriteOptions

WriteOptions LevelDB write database options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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