Documentation
¶
Index ¶
- func AppendAll(f *builder.File, promConfig *prom_config.Config) diag.Diagnostics
- func AppendAllNested(f *builder.File, promConfig *prom_config.Config, ...) diag.Diagnostics
- func AppendServiceDiscoveryConfigs(pb *build.PrometheusBlocks, serviceDiscoveryConfig prom_discover.Configs, ...) []discovery.Target
- func Convert(in []byte, extraArgs []string) ([]byte, diag.Diagnostics)
- func ValidateServiceDiscoveryConfigs(serviceDiscoveryConfigs prom_discover.Configs) diag.Diagnostics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendAll ¶
func AppendAll(f *builder.File, promConfig *prom_config.Config) diag.Diagnostics
AppendAll analyzes the entire prometheus config in memory and transforms it into Flow Arguments. It then appends each argument to the file builder. Exports from other components are correctly referenced to build the Flow pipeline.
func AppendAllNested ¶
func AppendAllNested(f *builder.File, promConfig *prom_config.Config, jobNameToCompLabelsFunc func(string) string, extraScrapeTargets []discovery.Target, remoteWriteExports *remotewrite.Exports) diag.Diagnostics
AppendAllNested analyzes the entire prometheus config in memory and transforms it into Flow Arguments. It then appends each argument to the file builder. Exports from other components are correctly referenced to build the Flow pipeline. Additional options can be provided overriding the job name, extra scrape targets, and predefined remote write exports.
func AppendServiceDiscoveryConfigs ¶
func AppendServiceDiscoveryConfigs(pb *build.PrometheusBlocks, serviceDiscoveryConfig prom_discover.Configs, label string) []discovery.Target
AppendServiceDiscoveryConfigs will loop through the service discovery configs and append them to the file. This returns the scrape targets and discovery targets as a result.
func Convert ¶
func Convert(in []byte, extraArgs []string) ([]byte, diag.Diagnostics)
Convert implements a Prometheus config converter.
extraArgs are supported to mirror the other converter params due to shared testing code but they should be passed empty to this converter.
func ValidateServiceDiscoveryConfigs ¶
func ValidateServiceDiscoveryConfigs(serviceDiscoveryConfigs prom_discover.Configs) diag.Diagnostics
Types ¶
This section is empty.