store

package
v0.0.0-...-24947a8 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2015 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LevelStore

type LevelStore struct {
	// contains filtered or unexported fields
}

LevelStore is the goleveldb storage

func NewLevelStore

func NewLevelStore(path string) (*LevelStore, error)

NewLevelStore returns a new LevelStore

func (*LevelStore) Close

func (l *LevelStore) Close() error

Close implements the Close interface

func (*LevelStore) Del

func (l *LevelStore) Del(key string) error

Del implements the Del interface

func (*LevelStore) Get

func (l *LevelStore) Get(key string) ([]byte, error)

Get implements the Get interface

func (*LevelStore) Set

func (l *LevelStore) Set(key string, data []byte) error

Set implements the Set interface

type MemStore

type MemStore struct {
	// contains filtered or unexported fields
}

MemStore is the in memory storage

func NewMemStore

func NewMemStore() (*MemStore, error)

NewMemStore returns a new MemStore

func (*MemStore) Close

func (m *MemStore) Close() error

Close implements the Close interface

func (*MemStore) Del

func (m *MemStore) Del(key string) error

Del implements the Del interface

func (*MemStore) Get

func (m *MemStore) Get(key string) ([]byte, error)

Get implements the Get interface

func (*MemStore) Set

func (m *MemStore) Set(key string, data []byte) error

Set implements the Set interface

type Storage

type Storage interface {
	Set(key string, data []byte) error
	Get(key string) ([]byte, error)
	Del(key string) error
	Close() error
}

Storage is the storage of uq

Jump to

Keyboard shortcuts

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