config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPClient

func NewHTTPClient(cfg HTTPClient) (*http.Client, error)

Types

type Config

type Config struct {
	MetricCollector  MetricCollector  `yaml:"metric_collector,omitempty"`
	RulesCollector   RulesCollector   `yaml:"rules_collector,omitempty"`
	PersesCollector  PersesCollector  `yaml:"perses_collector,omitempty"`
	GrafanaCollector GrafanaCollector `yaml:"grafana_collector,omitempty"`
}

func Resolve

func Resolve(configFile string) (Config, error)

type GrafanaCollector

type GrafanaCollector struct {
	Enable     bool           `yaml:"enable"`
	Period     model.Duration `yaml:"period,omitempty"`
	HTTPClient HTTPClient     `yaml:"http_client"`
}

func (*GrafanaCollector) Verify

func (c *GrafanaCollector) Verify() error

type HTTPClient

type HTTPClient struct {
	URL       *common.URL       `yaml:"url"`
	Oauth     *config.Oauth     `yaml:"oauth,omitempty"`
	TLSConfig *secret.TLSConfig `yaml:"tls_config,omitempty"`
}

type MetricCollector

type MetricCollector struct {
	Enable     bool           `yaml:"enable"`
	Period     model.Duration `yaml:"period,omitempty"`
	HTTPClient HTTPClient     `yaml:"http_client"`
}

func (*MetricCollector) Verify

func (c *MetricCollector) Verify() error

type PersesCollector

type PersesCollector struct {
	Enable     bool                    `yaml:"enable"`
	Period     model.Duration          `yaml:"period,omitempty"`
	HTTPClient config.RestConfigClient `yaml:"http_client"`
}

func (*PersesCollector) Verify

func (c *PersesCollector) Verify() error

type RulesCollector

type RulesCollector struct {
	Enable     bool           `yaml:"enable"`
	Period     model.Duration `yaml:"period,omitempty"`
	HTTPClient HTTPClient     `yaml:"http_client"`
}

func (*RulesCollector) Verify

func (c *RulesCollector) Verify() error

Jump to

Keyboard shortcuts

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