rdb

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2016 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const Version = rdb.Version

Variables

This section is empty.

Functions

func DecodeDump

func DecodeDump(p []byte) (interface{}, error)

func EncodeDump

func EncodeDump(obj interface{}) ([]byte, error)

Types

type BinEntry

type BinEntry struct {
	DB       uint32
	Key      []byte
	Value    []byte
	ExpireAt uint64
}

func (*BinEntry) ObjEntry

func (e *BinEntry) ObjEntry() (*ObjEntry, error)

type Encoder

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

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

func (*Encoder) EncodeFooter

func (e *Encoder) EncodeFooter() error

func (*Encoder) EncodeHeader

func (e *Encoder) EncodeHeader() error

func (*Encoder) EncodeObject

func (e *Encoder) EncodeObject(db uint32, key []byte, expireat uint64, obj interface{}) error

type HSortByField

type HSortByField struct{ Hash }

func (HSortByField) Less

func (by HSortByField) Less(i, j int) bool

type Hash

type Hash []*HashElement

func (Hash) Len

func (hash Hash) Len() int

func (Hash) Swap

func (hash Hash) Swap(i, j int)

type HashElement

type HashElement struct {
	Field, Value []byte
}

type List

type List [][]byte

type Loader

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

func NewLoader

func NewLoader(r io.Reader) *Loader

func (*Loader) Footer

func (l *Loader) Footer() error

func (*Loader) Header

func (l *Loader) Header() error

func (*Loader) NextBinEntry

func (l *Loader) NextBinEntry() (*BinEntry, error)

func (Loader) Read

func (r Loader) Read(p []byte) (int, error)

type ObjEntry

type ObjEntry struct {
	DB       uint32
	Key      []byte
	Value    interface{}
	ExpireAt uint64
}

func (*ObjEntry) BinEntry

func (e *ObjEntry) BinEntry() (*BinEntry, error)

type Set

type Set [][]byte

type String

type String []byte

type ZSet

type ZSet []*ZSetElement

func (ZSet) Len

func (zset ZSet) Len() int

func (ZSet) Swap

func (zset ZSet) Swap(i, j int)

type ZSetElement

type ZSetElement struct {
	Member []byte
	Score  float64
}

type ZSortByMember

type ZSortByMember struct{ ZSet }

func (ZSortByMember) Less

func (by ZSortByMember) Less(i, j int) bool

type ZSortByScore

type ZSortByScore struct{ ZSet }

func (ZSortByScore) Less

func (by ZSortByScore) Less(i, j int) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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