Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeDump(p []byte) (interface{}, error)
- func EncodeDump(obj interface{}) ([]byte, error)
- func NewRdbReader(r io.Reader) *rdbReader
- func NewSliceBuffer(s []byte) *sliceBuffer
- type BinEntry
- type Encoder
- type HSortByField
- type Hash
- type HashElement
- type List
- type Loader
- func (r Loader) CountZipmapItems(buf *sliceBuffer) (int, error)
- func (l *Loader) Footer() error
- func (l *Loader) Header() error
- func (l *Loader) NextBinEntry() (*BinEntry, error)
- func (r Loader) Read(p []byte) (int, error)
- func (r Loader) ReadByte() (byte, error)
- func (r Loader) ReadBytes(n int) ([]byte, error)
- func (r Loader) ReadDouble() (float64, error)
- func (r Loader) ReadFloat() (float64, error)
- func (r Loader) ReadLength() (uint32, error)
- func (r Loader) ReadString() ([]byte, error)
- func (r Loader) ReadZiplistEntry(buf *sliceBuffer) ([]byte, error)
- func (r Loader) ReadZiplistLength(buf *sliceBuffer) (int64, error)
- func (r Loader) ReadZipmapItem(buf *sliceBuffer, readFree bool) ([]byte, error)
- type ObjEntry
- type Set
- type String
- type ZSet
- type ZSetElement
- type ZSortByMember
- type ZSortByScore
Constants ¶
View Source
const ( RdbTypeString = 0 RdbTypeList = 1 RdbTypeSet = 2 RdbTypeZSet = 3 RdbTypeHash = 4 RdbTypeZSet2 = 5 RdbTypeHashZipmap = 9 RdbTypeListZiplist = 10 RdbTypeSetIntset = 11 RdbTypeZSetZiplist = 12 RdbTypeHashZiplist = 13 RdbTypeQuicklist = 14 RDBTypeStreamListPacks = 15 // stream RdbFlagAUX = 0xfa )
Variables ¶
View Source
var FromVersion int64 = 9
View Source
var ToVersion int64 = 6
Functions ¶
func DecodeDump ¶
func EncodeDump ¶
func NewRdbReader ¶
func NewSliceBuffer ¶
func NewSliceBuffer(s []byte) *sliceBuffer
Types ¶
type BinEntry ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
func (*Encoder) EncodeFooter ¶
func (*Encoder) EncodeHeader ¶
type HSortByField ¶
type HSortByField struct{ Hash }
func (HSortByField) Less ¶
func (by HSortByField) Less(i, j int) bool
type Hash ¶
type Hash []*HashElement
type HashElement ¶
type HashElement struct {
Field, Value []byte
}
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
func (Loader) CountZipmapItems ¶
func (*Loader) NextBinEntry ¶
func (Loader) ReadDouble ¶
func (Loader) ReadLength ¶
func (Loader) ReadString ¶
func (Loader) ReadZiplistEntry ¶
func (Loader) ReadZiplistLength ¶
func (Loader) ReadZipmapItem ¶
type ObjEntry ¶
type ZSet ¶
type ZSet []*ZSetElement
type ZSetElement ¶
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.