hllstore

package
v0.0.0-...-384627b Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UPD uint16 = iota
	DEL
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltStore

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

func NewBoltStore

func NewBoltStore(dbdir string, dbname string) *BoltStore

func (*BoltStore) Delete

func (bs *BoltStore) Delete(key string)

func (*BoltStore) Flush

func (bs *BoltStore) Flush()

func (*BoltStore) FlushAndStop

func (bs *BoltStore) FlushAndStop()

func (*BoltStore) Get

func (bs *BoltStore) Get(key string) ([]byte, uint64, error)

func (*BoltStore) GetExpiry

func (bs *BoltStore) GetExpiry(key string) (uint64, error)

func (*BoltStore) ProcessAll

func (bs *BoltStore) ProcessAll(processor KeyValProcessor) error

func (*BoltStore) Update

func (bs *BoltStore) Update(key string, expiry uint64, value []byte) bool

type HllStore

type HllStore interface {
	Update(key string, expiry uint64, value []byte) bool
	Delete(key string)
	ProcessAll(processor KeyValProcessor) error
	Get(key string) ([]byte, uint64, error)
	GetExpiry(key string) (uint64, error)
	FlushAndStop()
	Flush()
}

type KeyExpiry

type KeyExpiry struct {
	Key    string
	Expiry uint64
}

type KeyValProcessor

type KeyValProcessor interface {
	Process(key string, expiry uint64, value []byte) error
}

Jump to

Keyboard shortcuts

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