Documentation
¶
Index ¶
- func CheckSizeAndSerialize(m marshaler.AbstractMarshaler, compress bool, marshalFct MarshalFct, ...) (bool, []byte, []byte, error)
- func GetPayloadDrops() int64
- func JSONMarshalFct(m marshaler.AbstractMarshaler) ([]byte, error)
- func Payloads(m marshaler.AbstractMarshaler, compress bool, marshalFct MarshalFct, ...) (transaction.BytesPayloads, error)
- func ProtoMarshalFct(m marshaler.AbstractMarshaler) ([]byte, error)
- type MarshalFct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSizeAndSerialize ¶
func CheckSizeAndSerialize(m marshaler.AbstractMarshaler, compress bool, marshalFct MarshalFct, strategy compression.Component) (bool, []byte, []byte, error)
CheckSizeAndSerialize Check the size of a payload and marshall it (optionally compress it) The dual role makes sense as you will never serialize without checking the size of the payload
func GetPayloadDrops ¶
func GetPayloadDrops() int64
GetPayloadDrops returns the number of times we dropped some payloads because we couldn't split them.
func JSONMarshalFct ¶
func JSONMarshalFct(m marshaler.AbstractMarshaler) ([]byte, error)
JSONMarshalFct marshal with MarshalJSON method.
func Payloads ¶
func Payloads(m marshaler.AbstractMarshaler, compress bool, marshalFct MarshalFct, strategy compression.Component) (transaction.BytesPayloads, error)
Payloads serializes a metadata payload and sends it to the forwarder
func ProtoMarshalFct ¶
func ProtoMarshalFct(m marshaler.AbstractMarshaler) ([]byte, error)
ProtoMarshalFct marshal with Marshal method.
Types ¶
type MarshalFct ¶
type MarshalFct func(m marshaler.AbstractMarshaler) ([]byte, error)
MarshalFct marshal m. Must be either JSONMarshalFct or ProtoMarshalFct.
Click to show internal directories.
Click to hide internal directories.