metricstore

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const BearerTokenKey = "bearer.token"

BearerTokenKey is the string literal used internally in the implementation of this context.

View Source
const StoragePropagationKey = "storage.propagate.token"

StoragePropagationKey is a key for viper configuration to pass this option to storage plugins.

Variables

This section is empty.

Functions

func ContextWithBearerToken

func ContextWithBearerToken(ctx context.Context, token string) context.Context

ContextWithBearerToken set bearer token in context

func GetBearerToken

func GetBearerToken(ctx context.Context) (string, bool)

GetBearerToken from context, or empty string if there is no token

Types

type CompositeWriter

type CompositeWriter struct {
	// contains filtered or unexported fields
}

func NewCompositeWriter

func NewCompositeWriter(metricWriters ...Writer) *CompositeWriter

NewCompositeWriter creates a CompositeWriter

func (*CompositeWriter) WriteMetric

func (c *CompositeWriter) WriteMetric(metrics []prompb.TimeSeries) error

WriteMetric calls WriteMetric on each metric writer. It will sum up failures, it is not transactional

type Writer

type Writer interface {
	WriteMetric(metric []prompb.TimeSeries) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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