Documentation ¶
Index ¶
Constants ¶
View Source
const ( TableDataType byte CacheDataType StreamDataType TableDataProtoType )
Note: Do not change the order. Order is important because encoder is adding the type as the first byte. Check the Encode/Decode method to see how it is getting used.
Variables ¶
View Source
var ( UserTableKeyPrefix = []byte("data") SecondaryTableKeyPrefix = []byte("idx") SearchTableKeyPrefix = []byte("sea") PartitionKeyPrefix = []byte("part") CacheKeyPrefix = "cache" )
View Source
var EmptyData = &TableData{}
Functions ¶
func Encode ¶
Encode is used to encode data to the raw bytes which is used to store in storage as value. The first byte is storing the type corresponding to this Data. This is important and used by the decoder later to decode back.
func EncodeCacheData ¶
func EncodeStreamData ¶
Types ¶
type UserDataEncType ¶
type UserDataEncType int8
const ( MsgpackEncoding UserDataEncType = 1 JsonEncoding UserDataEncType = 2 )
Click to show internal directories.
Click to hide internal directories.