Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSplit ¶
type DataSplit struct { }
DataSplit can split a large slice of byte slices in chunks with len(chunks) <= limit It does not marshal the data
type SizeDataPacker ¶
type SizeDataPacker struct {
// contains filtered or unexported fields
}
SizeDataPacker can split a large slice of byte slices in chunks <= maxPacketSize If one element still exceeds maxPacketSize, it will be returned alone It does the marshaling of the resulted (smaller) slice of byte slices
func NewSizeDataPacker ¶
func NewSizeDataPacker(marshalizer marshal.Marshalizer) (*SizeDataPacker, error)
NewSizeDataPacker creates a new SizeDataPacker instance
func (*SizeDataPacker) PackDataInChunks ¶
func (sdp *SizeDataPacker) PackDataInChunks(data [][]byte, limit int) ([][]byte, error)
PackDataInChunks packs the provided data into smaller chunks limit is expressed in bytes
Click to show internal directories.
Click to hide internal directories.