split

package
v0.86.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 2 Imported by: 8 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SizeLimit added in v0.86.0

type SizeLimit uint8

SizeLimit is a bitmap of the payload size limits exceeded by a serialized payload.

const (
	// CompressedLimit is set when the compressed payload exceeds maxPayloadSizeCompressed.
	CompressedLimit SizeLimit = 1 << iota
	// UncompressedLimit is set when the uncompressed payload exceeds maxPayloadSizeUnCompressed.
	UncompressedLimit

	// WithinLimits means the payload exceeds no size limit.
	WithinLimits SizeLimit = 0
)

func CheckSizeAndSerialize

func CheckSizeAndSerialize(m marshaler.JSONMarshaler, compress bool, strategy compression.Component) (SizeLimit, []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 The returned SizeLimit has a bit set for each limit exceeded by the payload, it is WithinLimits if the payload doesn't need to be split.

func (SizeLimit) String added in v0.86.0

func (l SizeLimit) String() string

String returns the exceeded limits as a bounded set of values, suitable as a telemetry tag.

Jump to

Keyboard shortcuts

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