Documentation
¶
Overview ¶
Package config provides YAML configuration loading and validation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ListenAddr string `yaml:"listenAddr"`
MetricsPath string `yaml:"metricsPath"`
HistoryDB string `yaml:"historyDB"`
SPIFFESocket string `yaml:"spiffeSocket"`
OTelEndpoint string `yaml:"otelEndpoint"`
ClusterName string `yaml:"clusterName"`
Namespaces []string `yaml:"namespaces"`
External []ExternalTarget `yaml:"external"`
Remotes []RemoteCluster `yaml:"remotes"`
CTDomains []string `yaml:"ctDomains"`
CTAllowedIssuers []string `yaml:"ctAllowedIssuers"`
Notifications NotificationConfig `yaml:"notifications"`
RefreshEvery time.Duration `yaml:"refreshEvery"`
WarnBefore time.Duration `yaml:"warnBefore"`
CritBefore time.Duration `yaml:"critBefore"`
}
Config holds trustwatch runtime configuration.
type ExternalTarget ¶
type ExternalTarget struct {
URL string `yaml:"url"` // https://host:port or tcp://host:port?sni=name
}
ExternalTarget is an explicit TLS endpoint to probe.
type NotificationConfig ¶ added in v0.1.4
type NotificationConfig struct {
Webhooks []WebhookConfig `yaml:"webhooks"`
Severities []string `yaml:"severities"`
Cooldown time.Duration `yaml:"cooldown"`
Enabled bool `yaml:"enabled"`
}
NotificationConfig controls how notifications are sent.
type RemoteCluster ¶ added in v0.2.0
type RemoteCluster struct {
Name string `yaml:"name"` // cluster label
URL string `yaml:"url"` // base URL of remote trustwatch (e.g. http://trustwatch.staging:8080)
}
RemoteCluster describes a remote trustwatch instance to federate.
type WebhookConfig ¶ added in v0.1.4
type WebhookConfig struct {
URL string `yaml:"url"`
Type string `yaml:"type"` // "slack", "generic", "pagerduty", or "grafana"
RoutingKey string `yaml:"routingKey"` // PagerDuty Events API v2 routing key
APIKey string `yaml:"apiKey"` // Grafana API key (Bearer token)
DashboardUID string `yaml:"dashboardUID"` // Grafana dashboard UID (optional)
}
WebhookConfig describes a notification webhook endpoint.
Click to show internal directories.
Click to hide internal directories.