marshaler

package
v0.0.2-0...-4ce78c8 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferContext

type BufferContext struct {
	CompressorInput   *bytes.Buffer
	CompressorOutput  *bytes.Buffer
	PrecompressionBuf []byte
}

BufferContext contains the buffers used for MarshalSplitCompress so they can be shared between invocations

func DefaultBufferContext

func DefaultBufferContext() *BufferContext

DefaultBufferContext initialize the default compression buffers

type Marshaler

type Marshaler interface {
	MarshalJSON() ([]byte, error)
	Marshal() ([]byte, error)
	SplitPayload(int) ([]Marshaler, error)
	MarshalSplitCompress(*BufferContext) ([]*[]byte, error)
}

Marshaler is an interface for metrics that are able to serialize themselves to JSON and protobuf

Jump to

Keyboard shortcuts

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