Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{
APIURL: "https://api.github.com",
}
DefaultConfig holds the default settings for the github_exporter integration
Functions ¶
Types ¶
type Config ¶
type Config struct {
// URL for the github API
APIURL string `yaml:"api_url,omitempty"`
// A list of github repositories for which to collect metrics.
Repositories []string `yaml:"repositories,omitempty"`
// A list of github organizations for which to collect metrics.
Organizations []string `yaml:"organizations,omitempty"`
// A list of github users for which to collect metrics.
Users []string `yaml:"users,omitempty"`
// A github authentication token that allows the API to be queried more often.
APIToken config_util.Secret `yaml:"api_token,omitempty"`
// A path to a file containing a github authentication token that allows the API to be queried more often. If supplied, this supercedes `api_token`
APITokenFile string `yaml:"api_token_file,omitempty"`
}
Config controls github_exporter
func (*Config) InstanceKey ¶ added in v0.21.0
func (c *Config) InstanceKey(agentKey string) (string, error)
InstanceKey returns the hostname:port of the GitHub API server.
func (*Config) Name ¶
func (c *Config) Name() string
Name returns the name of the integration that this config represents.
func (*Config) NewIntegration ¶
func (c *Config) NewIntegration(logger log.Logger) (integrations.Integration, error)
NewIntegration creates a new github_exporter
func (*Config) UnmarshalYAML ¶
func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler for Config
Click to show internal directories.
Click to hide internal directories.