Documentation
¶
Overview ¶
Package options handles the command line flags.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointType ¶
type EndpointType string
const ( LogsEndpointType EndpointType = "logs" MetricsEndpointType EndpointType = "metrics" )
type LabelSpec ¶
type Options ¶
type Options struct {
LogLevel level.Option
EndpointType EndpointType
WriteEndpoint *url.URL
ReadEndpoint *url.URL
Labels labelArg
Logs logs
Listen string
Name string
Token auth.TokenProvider
Queries []Query
Period time.Duration
Duration time.Duration
Latency time.Duration
InitialQueryDelay time.Duration
SuccessThreshold float64
TLS TLS
DefaultStep time.Duration
Tenant string
TenantHeader string
}
type Query ¶
type Query interface {
// GetName gets the name of the query.
GetName() string
// GetType gets the query type.
GetType() string
// GetQuery gets the query statement (promql) or label/matchers of the query.
GetQuery() string
// Run executes the query.
Run(ctx context.Context, c promapi.Client, logger log.Logger, traceID string,
defaultStep time.Duration) (int, promapiv1.Warnings, error)
}
Query represents different types of queries.
type QuerySpec ¶
type SeriesSpec ¶
type SeriesSpec struct {
Name string `yaml:"name"`
Matchers []string `yaml:"matchers"`
Duration model.Duration `yaml:"duration"`
Cache bool `yaml:"cache"`
}
func (SeriesSpec) GetName ¶
func (q SeriesSpec) GetName() string
func (SeriesSpec) GetQuery ¶
func (q SeriesSpec) GetQuery() string
func (SeriesSpec) GetType ¶
func (q SeriesSpec) GetType() string
Click to show internal directories.
Click to hide internal directories.