remotewrite

package
v0.0.0-...-7251252 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Write(ctx context.Context, req *mimirpb.WriteRequest) error
}

Client provides Prometheus Remote Write API access functionality

func NewClient

func NewClient(cfg Config, metricsRecorder Recorder, tripperware querymiddleware.Tripperware) (Client, error)

NewClient creates the default http implementation of the Client

func NewMeasuredClient

func NewMeasuredClient(client Client, recorder Recorder, tracer opentracing.Tracer, timeNow func() time.Time) Client

type Config

type Config struct {
	Endpoint            string        `yaml:"endpoint"`
	Timeout             time.Duration `yaml:"timeout"`
	KeepAlive           time.Duration `yaml:"keep_alive"`
	MaxIdleConns        int           `yaml:"max_idle_conns"`
	MaxConns            int           `yaml:"max_conns"`
	SkipLabelValidation bool          `yaml:"skip_label_validation"`
	UserAgent           string        `yaml:"user_agent"`
}

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(flags *flag.FlagSet)

RegisterFlags implements flagext.Registerer

func (*Config) RegisterFlagsWithPrefix

func (c *Config) RegisterFlagsWithPrefix(prefix string, flags *flag.FlagSet)

RegisterFlagsWithPrefix registers flags, adding the provided prefix if needed. If the prefix is not blank and doesn't end with '.', a '.' is appended to it.

type MeasuredClient

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

func (*MeasuredClient) Write

func (mc *MeasuredClient) Write(ctx context.Context, req *mimirpb.WriteRequest) (err error)

type Recorder

type Recorder interface {
	// contains filtered or unexported methods
}

func NewRecorder

func NewRecorder(prefix string, reg prometheus.Registerer) Recorder

NewRecorder returns a new Prometheus metrics Recorder. It ensures that the ingester metrics are properly registered.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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