Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferSerializer ¶
BufferSerializer implements Serializer interface by bytes.Buffer.
func NewBuffer ¶
func NewBuffer(length int) *BufferSerializer
func (*BufferSerializer) Decode ¶
func (buffer *BufferSerializer) Decode(container interface{}) error
func (*BufferSerializer) DecodeAndRelease ¶
func (buffer *BufferSerializer) DecodeAndRelease(container interface{}) error
func (*BufferSerializer) Release ¶
func (buffer *BufferSerializer) Release()
type Serializer ¶
type Serializer interface { // Bytes returns the origin bytes data. Bytes() []byte // Decode serialize bytes to pointer value. Decode(container interface{}) error // Release put bytes to pool, avoiding memory leak and improve GC performance Release() // DecodeAndRelease execute Decode and Release function DecodeAndRelease(container interface{}) error }
Serializer provide bytes serialization to pointer
type SerializerBuilder ¶
type SerializerBuilder func() Serializer
Click to show internal directories.
Click to hide internal directories.