client

package
v0.0.0-...-b226f19 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QueryClient

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

func NewQueryClient

func NewQueryClient(cfg QueryClientConfig, logger log.Logger, reg prometheus.Registerer) *QueryClient

func (*QueryClient) Start

func (c *QueryClient) Start()

type QueryClientConfig

type QueryClientConfig struct {
	URL string

	// The tenant ID to use to push metrics to Cortex.
	UserID string

	QueryInterval time.Duration
	QueryTimeout  time.Duration
	QueryMaxAge   time.Duration

	ExpectedSeries        int
	ExpectedWriteInterval time.Duration

	AdditionalQueries []string
}

type WriteClient

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

func NewWriteClient

func NewWriteClient(cfg WriteClientConfig, logger log.Logger) *WriteClient

func (*WriteClient) Start

func (c *WriteClient) Start()

type WriteClientConfig

type WriteClientConfig struct {
	// Cortex URL.
	URL url.URL

	// The tenant ID to use to push metrics to Cortex.
	UserID string

	// Number of series to generate per write request.
	SeriesCount int

	// SeriesChurnPeriod is the time period during which all series gradually churn.
	// 0 to disable churning.
	SeriesChurnPeriod time.Duration

	// Number of extra labels to generate per write request.
	ExtraLabels int

	WriteInterval    time.Duration
	WriteTimeout     time.Duration
	WriteConcurrency int
	WriteBatchSize   int
}

Jump to

Keyboard shortcuts

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