split

package
v0.0.0-...-44638ef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSizeAndSerialize

func CheckSizeAndSerialize(m marshaler.AbstractMarshaler, compress bool, marshalFct MarshalFct) (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) (forwarder.Payloads, 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL