api

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	REMOTE_READ_SAMPLE_LIMIT       = 20000000
	REMOTE_READ_CONCURRENCY_LIMIT  = 50
	REMOTE_READ_MAX_BYTES_IN_FRAME = 1048576 // 1MB recommended by protobuf
)

Variables

This section is empty.

Functions

func NewPromHTTPClient

func NewPromHTTPClient(addr, path string, tlsConfig *tls.Config) (prom_api_client.API, error)

func NewPromReadClient

func NewPromReadClient(index int, addr string, timeout time.Duration,
	tlsConfig *config.TLSConfig) (remote.ReadClient, error)

Types

type DiscoveryAgent added in v1.4.3

type DiscoveryAgent interface {
	ApplyScrapeConfig(configs []*config.ScrapeConfig)
}

type PromAPI

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

func NewPromAPI

func NewPromAPI(promQLEngine *promql.Engine, log *logger.Logger) *PromAPI

func (*PromAPI) RouterForStorage

func (api *PromAPI) RouterForStorage(storage storage.Storage, ruleManager rules.RuleManager, gatherer prometheus.Gatherer, registerer prometheus.Registerer) *route.Router

type ReloadAPI added in v1.4.3

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

func NewReloadAPI added in v1.4.3

func NewReloadAPI(reloadConfig func(), log *logger.Logger) *ReloadAPI

func (*ReloadAPI) Register added in v1.4.3

func (api *ReloadAPI) Register(r *route.Router)

func (*ReloadAPI) Router added in v1.4.3

func (api *ReloadAPI) Router() *route.Router

type Rule

type Rule struct {
	Record      string            `yaml:"record,omitempty"`
	Alert       string            `yaml:"alert,omitempty"`
	Expr        string            `yaml:"expr"`
	For         string            `yaml:"for,omitempty"`
	Labels      map[string]string `yaml:"labels,omitempty"`
	Annotations map[string]string `yaml:"annotations,omitempty"`
}

type RulesAPI

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

func NewRulesAPI

func NewRulesAPI(ruleManager rules.RuleManager, log *logger.Logger) *RulesAPI

func (*RulesAPI) Register

func (api *RulesAPI) Register(r *route.Router)

func (*RulesAPI) Router

func (api *RulesAPI) Router() *route.Router

type ScrapeManager added in v1.4.3

type ScrapeManager interface {
	ApplyConfig(cfg *config.Config) error
}

Jump to

Keyboard shortcuts

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