Versions in this module Expand all Collapse all v0 v0.7.3 Aug 16, 2018 v0.7.2 Aug 2, 2018 v0.7.1 Aug 1, 2018 v0.6.4 Aug 1, 2018 v0.6.3 Jul 27, 2018 Changes in this version + func DecodePrimaryKey(buf []byte, col *metapb.Column) ([]byte, []byte, error) + func DecodePrimaryKey2(buf []byte, col *metapb.Column) ([]byte, interface{}, error) + func DecodeValue2(buf []byte) ([]byte, uint32, []byte, encoding.Type, error) + func EncodeValue2(buf []byte, colId uint32, typ encoding.Type, sval []byte) ([]byte, error) v0.6.2 Jun 18, 2018 v0.6.1 Jun 17, 2018 Changes in this version + const GB + const KB + const MB + const MinRead + const Store_Prefix_Invalid + const Store_Prefix_KV + const Store_Prefix_RaftLog + const Store_Prefix_Range + const TTL_COL_NAME + var ErrDisposed = errors.New(`queue: disposed`) + var ErrEmptyQueue = errors.New(`queue: empty queue`) + var ErrHasReleaser = errors.New("fbase/util.Releaser: already defined") + var ErrReleased = errors.New("fbase/util.Releaser: resource already relesed") + var ErrTimeout = errors.New(`queue: poll timed out`) + func Decode(buf []byte, v proto.Message) error + func DecodeColumnValue(buf []byte, col *metapb.Column) ([]byte, interface{}, error) + func DecodeStorePrefix(buff []byte) (prefix uint8, table_id uint64, err error) + func Encode(v proto.Message) ([]byte, error) + func EncodeColumnValue(buf []byte, col *metapb.Column, sval []byte) ([]byte, error) + func EncodePrimaryKey(buf []byte, col *metapb.Column, sval []byte) ([]byte, error) + func EncodeStorePrefix(prefix uint8, table_id uint64) []byte + func ExecuteInParallel(q *Queue, fn func(interface{})) + func GetIpFromContext(ctx context.Context) string + func GetLocalIps() []string + func Hash(data []byte, seed uint32) uint32 + func MaxInt(a, b int) int + func MinInt(a, b int) int + func RandomBytes(r *rand.Rand, dst []byte) + func ShorteNBytes(bytes int) string + func SliceToString(b []byte) (s string) + func StringToSlice(s string) (b []byte) + type BasicReleaser struct + func (r *BasicReleaser) Release() + func (r *BasicReleaser) Released() bool + func (r *BasicReleaser) SetReleaser(releaser Releaser) + type Buffer struct + func NewBuffer(buf []byte) *Buffer + func (b *Buffer) Alloc(n int) []byte + func (b *Buffer) Bytes() []byte + func (b *Buffer) Grow(n int) + func (b *Buffer) Len() int + func (b *Buffer) Next(n int) []byte + func (b *Buffer) Read(p []byte) (n int, err error) + func (b *Buffer) ReadByte() (c byte, err error) + func (b *Buffer) ReadBytes(delim byte) (line []byte, err error) + func (b *Buffer) ReadFrom(r io.Reader) (n int64, err error) + func (b *Buffer) Reset() + func (b *Buffer) String() string + func (b *Buffer) Truncate(n int) + func (b *Buffer) Write(p []byte) (n int, err error) + func (b *Buffer) WriteByte(c byte) error + func (b *Buffer) WriteTo(w io.Writer) (n int64, err error) + type BufferPool struct + func NewBufferPool(baseline int) *BufferPool + func (p *BufferPool) Close() + func (p *BufferPool) Get(n int) []byte + func (p *BufferPool) Put(b []byte) + func (p *BufferPool) String() string + type ByteSize uint64 + func (b *ByteSize) UnmarshalJSON(text []byte) error + func (b *ByteSize) UnmarshalText(text []byte) error + func (b ByteSize) MarshalJSON() ([]byte, error) + type CRC uint32 + func NewCRC(b []byte) CRC + func (c CRC) Update(b []byte) CRC + func (c CRC) Value() uint32 + type Clocker interface + Now func() uint64 + func NewIncrementSeqClock() Clocker + type Duration struct + func NewDuration(duration time.Duration) Duration + func (d *Duration) MarshalJSON() ([]byte, error) + func (d *Duration) UnmarshalJSON(text []byte) error + func (d *Duration) UnmarshalText(text []byte) error + type Int64Slice []int64 + func (p Int64Slice) Len() int + func (p Int64Slice) Less(i, j int) bool + func (p Int64Slice) Sort() + func (p Int64Slice) Swap(i, j int) + type KeyPair struct + EndKey []byte + StartKey []byte + type KeyPairSlice []KeyPair + func (slice KeyPairSlice) Get(i int) KeyPair + func (slice KeyPairSlice) Len() int + func (slice KeyPairSlice) Less(i, j int) bool + func (slice KeyPairSlice) Sort() + func (slice KeyPairSlice) Swap(i, j int) + type NoopReleaser struct + func (NoopReleaser) Release() + type OffsetQueue struct + func NewOffsetQueue() *OffsetQueue + func (q *OffsetQueue) Add(item interface{}) uint64 + func (q *OffsetQueue) Get(offset uint64) ([]interface{}, uint64) + func (q *OffsetQueue) GetMaxOffset() uint64 + type Queue struct + func New(hint int64) *Queue + func (q *Queue) Dispose() []interface{} + func (q *Queue) Disposed() bool + func (q *Queue) Empty() bool + func (q *Queue) Get(number int64, items []interface{}) (int64, error) + func (q *Queue) Len() int64 + func (q *Queue) Peek() (interface{}, error) + func (q *Queue) Poll(number int64, items []interface{}, timeout time.Duration) (int64, error) + func (q *Queue) Put(items ...interface{}) error + func (q *Queue) PutOrUpdate(cmp func(interface{}, interface{}) bool, item interface{}) error + type Range struct + Limit []byte + Start []byte + func BytesPrefix(prefix []byte) *Range + type ReleaseSetter interface + SetReleaser func(releaser Releaser) + type Releaser interface + Release func() + type StringSlice []string + func (s *StringSlice) UnmarshalJSON(text []byte) error + func (s StringSlice) MarshalJSON() ([]byte, error)