Documentation
¶
Overview ¶
Package autodiscoveryimpl implements the agent's autodiscovery mechanism.
Index ¶
- func GetConfigErrors() map[string]string
- func GetResolveWarnings() map[string][]string
- func Module() fxutil.Module
- type AutoConfig
- func (ac *AutoConfig) AddConfigProvider(provider providerTypes.ConfigProvider, shouldPoll bool, ...)
- func (ac *AutoConfig) AddListeners(listenerConfigs []pkgconfigsetup.Listeners)
- func (ac *AutoConfig) AddScheduler(name string, s scheduler.Scheduler, replayConfigs bool)
- func (ac *AutoConfig) GetAllConfigs() []integration.Config
- func (ac *AutoConfig) GetAutodiscoveryErrors() map[string]map[string]providerTypes.ErrorMsgSet
- func (ac *AutoConfig) GetConfigCheck() integration.ConfigCheckResponse
- func (ac *AutoConfig) GetIDOfCheckWithEncryptedSecrets(checkID checkid.ID) checkid.ID
- func (ac *AutoConfig) GetProviderCatalog() map[string]providerTypes.ConfigProviderFactory
- func (ac *AutoConfig) GetTelemetryStore() *acTelemetry.Store
- func (ac *AutoConfig) GetUnresolvedConfigs() []integration.Config
- func (ac *AutoConfig) LoadAndRun(ctx context.Context)
- func (ac *AutoConfig) RemoveScheduler(name string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigErrors ¶
GetConfigErrors gets the config errors
func GetResolveWarnings ¶
GetResolveWarnings get the resolve warnings/errors
Types ¶
type AutoConfig ¶
type AutoConfig struct {
// contains filtered or unexported fields
}
AutoConfig implements the agent's autodiscovery mechanism. It is responsible to collect integrations configurations from different sources and then "schedule" or "unschedule" them by notifying subscribers. See the module README for details.
func (*AutoConfig) AddConfigProvider ¶
func (ac *AutoConfig) AddConfigProvider(provider providerTypes.ConfigProvider, shouldPoll bool, pollInterval time.Duration)
AddConfigProvider adds a new configuration provider to AutoConfig. Callers must pass a flag to indicate whether the configuration provider expects to be polled and at which interval or it's fine for it to be invoked only once in the Agent lifetime. If the config provider is polled, the routine is scheduled right away
func (*AutoConfig) AddListeners ¶
func (ac *AutoConfig) AddListeners(listenerConfigs []pkgconfigsetup.Listeners)
AddListeners tries to initialise the listeners listed in the given configs. A first try is done synchronously. If a listener fails with a ErrWillRetry, the initialization will be re-triggered later until success or ErrPermaFail.
func (*AutoConfig) AddScheduler ¶
func (ac *AutoConfig) AddScheduler(name string, s scheduler.Scheduler, replayConfigs bool)
AddScheduler a new scheduler to receive configurations.
Previously scheduled configurations that have not subsequently been unscheduled can be replayed with the replayConfigs flag. This replay occurs immediately, before the AddScheduler call returns.
func (*AutoConfig) GetAllConfigs ¶
func (ac *AutoConfig) GetAllConfigs() []integration.Config
GetAllConfigs returns all resolved and non-template configs known to AutoConfig.
func (*AutoConfig) GetAutodiscoveryErrors ¶
func (ac *AutoConfig) GetAutodiscoveryErrors() map[string]map[string]providerTypes.ErrorMsgSet
GetAutodiscoveryErrors fetches AD errors from each ConfigProvider. The resulting data structure maps provider name to resource name to a set of unique error messages. The resource names do not match other identifiers and are only intended for display in diagnostic tools like `agent status`.
func (*AutoConfig) GetConfigCheck ¶
func (ac *AutoConfig) GetConfigCheck() integration.ConfigCheckResponse
GetConfigCheck returns scrubbed information from all configuration providers
func (*AutoConfig) GetIDOfCheckWithEncryptedSecrets ¶
func (ac *AutoConfig) GetIDOfCheckWithEncryptedSecrets(checkID checkid.ID) checkid.ID
GetIDOfCheckWithEncryptedSecrets returns the ID that a checkID had before decrypting its secrets. Returns empty if the check with the given ID does not have any secrets.
func (*AutoConfig) GetProviderCatalog ¶
func (ac *AutoConfig) GetProviderCatalog() map[string]providerTypes.ConfigProviderFactory
GetProviderCatalog returns all registered ConfigProviderFactory.
func (*AutoConfig) GetTelemetryStore ¶
func (ac *AutoConfig) GetTelemetryStore() *acTelemetry.Store
GetTelemetryStore returns autodiscovery telemetry store.
func (*AutoConfig) GetUnresolvedConfigs ¶
func (ac *AutoConfig) GetUnresolvedConfigs() []integration.Config
GetUnresolvedConfigs returns all resolved and non-template configs known to AutoConfig.
func (*AutoConfig) LoadAndRun ¶
func (ac *AutoConfig) LoadAndRun(ctx context.Context)
LoadAndRun loads all of the integration configs it can find and schedules them. Should always be run once so providers that don't need polling will be queried at least once
func (*AutoConfig) RemoveScheduler ¶
func (ac *AutoConfig) RemoveScheduler(name string)
RemoveScheduler allows to remove a scheduler from the AD system.