common

package
v1.101.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PutPushCtx

func PutPushCtx(ctx *PushCtx)

PutPushCtx returns ctx to the pool.

ctx mustn't be used after returning to the pool.

Types

type PushCtx

type PushCtx struct {
	// WriteRequest contains the WriteRequest, which must be pushed later to remote storage.
	//
	// The actual labels and samples for the time series are stored in Labels and Samples fields.
	WriteRequest prompbmarshal.WriteRequest

	// Labels contains flat list of all the labels used in WriteRequest.
	Labels []prompbmarshal.Label

	// Samples contains flat list of all the samples used in WriteRequest.
	Samples []prompbmarshal.Sample
}

PushCtx is a context used for populating WriteRequest.

func GetPushCtx

func GetPushCtx() *PushCtx

GetPushCtx returns PushCtx from pool.

Call PutPushCtx when the ctx is no longer needed.

func (*PushCtx) Reset

func (ctx *PushCtx) Reset()

Reset resets ctx.

Jump to

Keyboard shortcuts

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