Discover Packages
github.com/supermatt/query-exporter-go
src
config
package
Version:
v0.0.0-...-b7e9043
Opens a new window with list of versions in this module.
Published: Mar 18, 2023
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Config struct {
Endpoints []Endpoint `yaml:"endpoints"`
Server Server `yaml:"server"`
Metrics Metrics `yaml:"metrics"`
Debug bool `yaml:"debug"`
}
load the config from a file.
the file should either be the one provided, or config.yaml or config.yml
A function to create a new config object
type Endpoint struct {
Name string `yaml:"name"`
Address string `yaml:"address"`
Query string `yaml:"query"`
QueryOffsets []string `yaml:"query_offsets"`
}
type Metrics struct {
Prefix string `yaml:"prefix"`
}
type Server struct {
Port int `yaml:"port"`
MetricsEndpoint string `yaml:"metrics_endpoint"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.