Documentation
¶
Index ¶
Constants ¶
View Source
const (
DefaultAgentConfigFile = "agent.yaml"
)
Variables ¶
This section is empty.
Functions ¶
func ApplyRuntimeOverrides ¶
func ApplyRuntimeOverrides(cfg *Config, rt *bridgeproto.AgentRuntimeConfig) (restart bool, reconnect bool)
ApplyRuntimeOverrides mutates the config with runtime values and reports whether restart/reconnect are needed.
func MarkRuntimeProvenance ¶
func MarkRuntimeProvenance(eff *EffectiveConfig, rt *bridgeproto.AgentRuntimeConfig)
MarkRuntimeProvenance marks runtime-managed fields as remote in provenance map.
Types ¶
type Config ¶
type Config struct {
ServerURL string `mapstructure:"serverURL" yaml:"serverURL"`
ClientID string `mapstructure:"clientID" yaml:"clientID"`
ClientSecret string `mapstructure:"clientSecret" yaml:"clientSecret"`
TenantID string `mapstructure:"tenantID" yaml:"tenantID"`
AutoConnectOnStart bool `mapstructure:"autoConnectOnStart" yaml:"autoConnectOnStart"`
DIS types.DISConfig `mapstructure:"dis" yaml:"dis"`
TLS struct {
Enabled bool `mapstructure:"enabled" yaml:"enabled"`
InsecureSkipVerify bool `mapstructure:"insecureSkipVerify" yaml:"insecureSkipVerify"`
} `mapstructure:"tls" yaml:"tls"`
Control ControlConfig `mapstructure:"control" yaml:"control"`
AppliedLoki *bridgeproto.LokiConfig `mapstructure:"-" yaml:"-"`
}
Config is the shared agent configuration (local + effective).
type ControlConfig ¶
type ControlConfig struct {
Enabled bool `mapstructure:"enabled" yaml:"enabled"`
Addr string `mapstructure:"addr" yaml:"addr"`
Token string `mapstructure:"token" yaml:"token"`
}
ControlConfig governs the local control API.
type EffectiveConfig ¶
type EffectiveConfig struct {
Config *Config `json:"config"`
Provenance map[string]string `json:"provenance"`
}
EffectiveConfig pairs the config with provenance metadata.
func ToEffective ¶
func ToEffective(cfg *Config) *EffectiveConfig
ToEffective wraps the config with provenance defaults (local) for API responses.
Click to show internal directories.
Click to hide internal directories.