Documentation
¶
Index ¶
- Constants
- func AsyncNoBlockSend(ch chan<- struct{})
- func AsyncNoBlockSendUint64(ch chan uint64, v uint64)
- func BuildMatchRegexp(match string) (*regexp.Regexp, error)
- func Bytes2String(b []byte) (s string)
- func ConcatBytes(slices [][]byte) []byte
- func GetProto(addr string) string
- func IsNil(i interface{}) bool
- func MinInt(a int, b int) int
- func StrInt32(v []byte, err error) (int32, error)
- func StrInt64(v []byte, err error) (int64, error)
- func StrInt8(v []byte, err error) (int8, error)
- func StrUint64(v []byte, err error) (uint64, error)
- func String2Bytes(s string) (b []byte)
- type BatchOp
- type BatchOpBuffer
Constants ¶
View Source
const ( BatchOpTypeUnkonw byte = iota BatchOpTypePut BatchOpTypeDel )
Variables ¶
This section is empty.
Functions ¶
func AsyncNoBlockSend ¶
func AsyncNoBlockSend(ch chan<- struct{})
AsyncNoBlockSend async no block send notify channel.
func AsyncNoBlockSendUint64 ¶
AsyncNoBlockSendUint64 async no block send Uint64 channel.
func Bytes2String ¶
no copy to change slice to string use your own risk
func ConcatBytes ¶
func String2Bytes ¶
no copy to change string to slice use your own risk
Types ¶
type BatchOpBuffer ¶
type BatchOpBuffer struct { // use list to batch once commit batch put one i/o syscall // async --> system buff - flush ->disk // sync - flush -> disk OpList list.List }
func NewBatchOpBuffer ¶
func NewBatchOpBuffer() *BatchOpBuffer
func (*BatchOpBuffer) Del ¶
func (bt *BatchOpBuffer) Del(key []byte)
func (*BatchOpBuffer) FrontElement ¶
func (bt *BatchOpBuffer) FrontElement() *list.Element
func (*BatchOpBuffer) Len ¶
func (bt *BatchOpBuffer) Len() int
func (*BatchOpBuffer) Put ¶
func (bt *BatchOpBuffer) Put(key, value []byte)
func (*BatchOpBuffer) Reset ¶
func (bt *BatchOpBuffer) Reset()
Click to show internal directories.
Click to hide internal directories.