common

package
v1.89.0-cluster Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 4 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 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