msgpack

package
v0.0.0-...-dc7bb07 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BucketCapacity    = 64
	UtilizationFactor = 0.75
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket [][]byte

func (*Bucket) DecodeMsg

func (z *Bucket) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (Bucket) EncodeMsg

func (z Bucket) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Bucket) MarshalMsg

func (z Bucket) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Bucket) Msgsize

func (z Bucket) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Bucket) UnmarshalMsg

func (z *Bucket) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Root

type Root struct {
	Size        int64
	BucketCount int64
	SplitIndex  uint64
	MaskHigh    uint64
	MaskLow     uint64
	HashKey     []byte
	// contains filtered or unexported fields
}

func NewRoot

func NewRoot(hashKey []byte) *Root

func (*Root) BucketIndex

func (r *Root) BucketIndex(key uint64) uint64

func (*Root) NeedsSplit

func (r *Root) NeedsSplit() bool

func (*Root) UpdateRaw

func (r *Root) UpdateRaw() *RootRaw

type RootRaw

type RootRaw struct {
	Size        msgp.Number
	BucketCount msgp.Number
	SplitIndex  msgp.Number
	MaskHigh    msgp.Number
	MaskLow     msgp.Number
	HashKey     []byte
}

func (*RootRaw) DecodeMsg

func (z *RootRaw) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*RootRaw) EncodeMsg

func (z *RootRaw) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*RootRaw) MarshalMsg

func (z *RootRaw) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*RootRaw) Msgsize

func (z *RootRaw) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*RootRaw) ToRoot

func (rr *RootRaw) ToRoot() *Root

func (*RootRaw) UnmarshalMsg

func (z *RootRaw) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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