Documentation ¶
Index ¶
- func ReleaseDict(d *Dict)
- type Dict
- func (z *Dict) DecodeMsg(dc *msgp.Reader) (err error)
- func (d *Dict) Del(key string)
- func (d *Dict) DelBytes(key []byte)
- func (z *Dict) EncodeMsg(en *msgp.Writer) (err error)
- func (d *Dict) Get(key string) interface{}
- func (d *Dict) GetBytes(key []byte) interface{}
- func (d *Dict) Has(key string) bool
- func (d *Dict) HasBytes(key []byte) bool
- func (d *Dict) Len() int
- func (d *Dict) Less(i, j int) bool
- func (d *Dict) Map(dst DictMap)
- func (z *Dict) MarshalMsg(b []byte) (o []byte, err error)
- func (z *Dict) Msgsize() (s int)
- func (d *Dict) Parse(src DictMap)
- func (d *Dict) Reset()
- func (d *Dict) Set(key string, value interface{})
- func (d *Dict) SetBytes(key []byte, value interface{})
- func (d *Dict) Swap(i, j int)
- func (z *Dict) UnmarshalMsg(bts []byte) (o []byte, err error)
- type DictMap
- type KV
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dict ¶
type Dict struct { // D slice of KV for storage the data D []KV // Use binary search to the get an item. // It's only useful on big heaps. // // WARNING: Increase searching performance on big heaps, // but whe set new items could be slowier due to the sorting. BinarySearch bool }
Dict dictionary as slice with better performance.
func (*Dict) Less ¶
Less reports whether the element with index i should sort before the element with index j.
func (*Dict) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (*Dict) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
type DictMap ¶
type DictMap map[string]interface{}
DictMap dictionary as map.
func (DictMap) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type KV ¶
type KV struct { Key string Value interface{} }
KV struct so it storages key/value data.
func (KV) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
Click to show internal directories.
Click to hide internal directories.