Documentation ¶
Index ¶
- func AddPrefix(scrapeConfigs []*config.ScrapeConfig, prefix string) []*config.ScrapeConfig
- func ConfigToResource(cfg *Config) (*v1.PrometheusConfig, error)
- func NewPrometheusConfigmapConverter() configmap.ConfigMapConverter
- func ResourceClientFactory(kube kubernetes.Interface, kubeCache cache.KubeCoreCache) factory.ResourceClientFactory
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPrefix ¶
func AddPrefix(scrapeConfigs []*config.ScrapeConfig, prefix string) []*config.ScrapeConfig
func ConfigToResource ¶
func ConfigToResource(cfg *Config) (*v1.PrometheusConfig, error)
func NewPrometheusConfigmapConverter ¶
func NewPrometheusConfigmapConverter() configmap.ConfigMapConverter
func ResourceClientFactory ¶
func ResourceClientFactory(kube kubernetes.Interface, kubeCache cache.KubeCoreCache) factory.ResourceClientFactory
Types ¶
type Config ¶
type Config struct { GlobalConfig *config.GlobalConfig `yaml:"global"` AlertingConfig config.AlertingConfig `yaml:"alerting,omitempty"` RuleFiles []string `yaml:"rule_files,omitempty"` ScrapeConfigs []*config.ScrapeConfig `yaml:"scrape_configs,omitempty"` RemoteWriteConfigs []*config.RemoteWriteConfig `yaml:"remote_write,omitempty"` RemoteReadConfigs []*config.RemoteReadConfig `yaml:"remote_read,omitempty"` }
type Config config.Config
func ConfigFromResource ¶
func ConfigFromResource(cfg *v1.PrometheusConfig) (*Config, error)
func (*Config) AddScrapeConfigs ¶
func (cfg *Config) AddScrapeConfigs(scrapeConfigs []*config.ScrapeConfig) int
returns number of added
func (*Config) RemoveScrapeConfigs ¶
returns number of removed
Click to show internal directories.
Click to hide internal directories.