Help us shape the future of Go! Take the 2026 Go Developer Survey

points

package
v2.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMaxBatchSizeExceeded is returned when a points batch exceeds
	// the defined upper limit in bytes. This pertains to the size of the
	// batch after inflation from any compression (i.e. ungzipped).
	ErrMaxBatchSizeExceeded = errors.New("points batch is too large")
)

Functions

func BatchReadCloser

func BatchReadCloser(rc io.ReadCloser, encoding string, maxBatchSizeBytes int64) (io.ReadCloser, error)

BatchReadCloser (potentially) wraps an io.ReadCloser in Gzip decompression and limits the reading to a specific number of bytes.

Types

type ParsedPoints

type ParsedPoints struct {
	Points  models.Points
	RawSize int
}

ParsedPoints contains the points parsed as well as the total number of bytes after decompression.

type Parser

type Parser struct {
	Precision string
}

Parser parses batches of Points.

func NewParser

func NewParser(precision string) *Parser

NewParser returns a new Parser

func (*Parser) Parse

func (pw *Parser) Parse(ctx context.Context, orgID, bucketID platform.ID, rc io.ReadCloser) (*ParsedPoints, error)

Parse parses the points from an io.ReadCloser for a specific Bucket.

Jump to

Keyboard shortcuts

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