Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSecret ¶
CheckSecret is a helper function to ensure the original value is overwritten with <secret>
Types ¶
type AgentManagementConfig ¶
type AgentManagementConfig struct { Enabled bool `yaml:"-"` // Derived from enable-features=agent-management Host string `yaml:"host"` Protocol string `yaml:"protocol"` PollingInterval time.Duration `yaml:"polling_interval"` HTTPClientConfig config.HTTPClientConfig `yaml:",inline"` RemoteConfiguration RemoteConfiguration `yaml:"remote_configuration"` }
func (*AgentManagementConfig) Validate ¶
func (am *AgentManagementConfig) Validate() error
Validate checks that necessary portions of the config have been set.
type Config ¶
type Config struct { Server *server.Config `yaml:"server,omitempty"` Metrics metrics.Config `yaml:"metrics,omitempty"` Integrations VersionedIntegrations `yaml:"integrations,omitempty"` Traces traces.Config `yaml:"traces,omitempty"` Logs *logs.Config `yaml:"logs,omitempty"` AgentManagement AgentManagementConfig `yaml:"agent_management,omitempty"` // Flag-only fields ServerFlags server.Flags `yaml:"-"` // Deprecated fields user has used. Generated during UnmarshalYAML. Deprecations []string `yaml:"-"` // Remote config options BasicAuthUser string `yaml:"-"` BasicAuthPassFile string `yaml:"-"` // Toggle for config endpoint(s) EnableConfigEndpoints bool `yaml:"-"` // Toggle for support bundle generation. DisableSupportBundle bool `yaml:"-"` // Report enabled features options EnableUsageReport bool `yaml:"-"` EnabledFeatures []string `yaml:"-"` }
Config contains underlying configurations for Grafana Agent static mode.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig holds default settings for all the subsystems.
func LoadFromFunc ¶
LoadFromFunc injects a function for retrieving the config file that doesn't require having a literal file on disk.
func (Config) MarshalYAML ¶
MarshalYAML implements yaml.Marshaler.
func (*Config) RegisterFlags ¶
RegisterFlags registers flags in underlying configs
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.
type IntegrationsVersion ¶
type IntegrationsVersion int
const ( IntegrationsVersion1 IntegrationsVersion = iota IntegrationsVersion2 )
type RemoteConfiguration ¶
type RemoteConfiguration struct { Labels labelMap `yaml:"labels"` LabelManagementEnabled bool `yaml:"label_management_enabled"` AcceptHTTPNotModified bool `yaml:"accept_http_not_modified"` AgentID string `yaml:"agent_id"` Namespace string `yaml:"namespace"` CacheLocation string `yaml:"cache_location"` }
func (*RemoteConfiguration) UnmarshalYAML ¶
func (rc *RemoteConfiguration) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implement YAML Unmarshaler
type VersionedIntegrations ¶
type VersionedIntegrations struct { Version IntegrationsVersion ConfigV1 *v1.ManagerConfig ConfigV2 *v2.SubsystemOptions // ExtraIntegrations is used when adding any integrations NOT in the default agent configuration ExtraIntegrations []v2.Config // contains filtered or unexported fields }
VersionedIntegrations abstracts the subsystem configs for integrations v1 and v2. VersionedIntegrations can only be unmarshaled as part of Load.
func DefaultVersionedIntegrations ¶
func DefaultVersionedIntegrations() VersionedIntegrations
DefaultVersionedIntegrations is the default config for integrations.
func (*VersionedIntegrations) ApplyDefaults ¶
ApplyDefaults applies defaults to the subsystem based on globals.
func (VersionedIntegrations) IsZero ¶
func (c VersionedIntegrations) IsZero() bool
IsZero implements yaml.IsZeroer.
func (VersionedIntegrations) MarshalYAML ¶
func (c VersionedIntegrations) MarshalYAML() (interface{}, error)
MarshalYAML implements yaml.Marshaler.
func (*VersionedIntegrations) UnmarshalYAML ¶
func (c *VersionedIntegrations) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler. Full unmarshaling is deferred until setVersion is invoked.
Directories ¶
Path | Synopsis |
---|---|
Package features enables a way to encode enabled features in a flag.FlagSet.
|
Package features enables a way to encode enabled features in a flag.FlagSet. |