Documentation ¶
Index ¶
- type Config
- type MetricMessage
- type MetricState
- type MetricWrapper
- type Provider
- func LoadProviderFromConfig(ctx context.Context, cfg Config) (Provider, error)
- func NewProviderContainer() (Provider, error)
- func NewProviderFileSystemUsage(params map[string]any) (Provider, error)
- func NewProviderPing(params map[string]any) (Provider, error)
- func NewProviderSystemd(ctx context.Context, params map[string]any) (Provider, error)
- type ProviderContainer
- type ProviderFileSystemUsage
- type ProviderPing
- type ProviderSystemd
- type ScrapeResultWrapper
- type UpdateTaskList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricMessage ¶
type MetricState ¶
type MetricWrapper ¶ added in v1.1.0
type MetricWrapper struct {
// contains filtered or unexported fields
}
func (*MetricWrapper) PushFailure ¶ added in v1.1.0
func (wrapper *MetricWrapper) PushFailure(description string, args ...any)
func (*MetricWrapper) PushMessage ¶ added in v1.1.0
func (wrapper *MetricWrapper) PushMessage(description string, args ...any)
func (*MetricWrapper) PushOK ¶ added in v1.1.0
func (wrapper *MetricWrapper) PushOK()
type Provider ¶
type Provider interface { // return the list of tasks to be performed to update the provider metrics. // This function is called only once at startup. // Tasks may be executed in parallel. GetUpdateTaskList(ctx context.Context, resultWrapper *ScrapeResultWrapper, storage storage.Storager) UpdateTaskList MultipleInstanceAllowed() bool Destroy() }
func LoadProviderFromConfig ¶
func NewProviderContainer ¶ added in v1.1.0
func NewProviderFileSystemUsage ¶ added in v1.1.0
type ProviderContainer ¶ added in v1.1.0
type ProviderContainer struct {
// contains filtered or unexported fields
}
func (*ProviderContainer) Destroy ¶ added in v1.1.0
func (*ProviderContainer) Destroy()
func (*ProviderContainer) GetUpdateTaskList ¶ added in v1.1.0
func (containerProvider *ProviderContainer) GetUpdateTaskList(ctx context.Context, resultWrapper *ScrapeResultWrapper, storage storage.Storager) UpdateTaskList
func (*ProviderContainer) MultipleInstanceAllowed ¶ added in v1.1.0
func (containerProvider *ProviderContainer) MultipleInstanceAllowed() bool
type ProviderFileSystemUsage ¶ added in v1.1.0
type ProviderFileSystemUsage struct { MountPoints []string `json:"mountpoints"` SpaceRemainingThreshold uint `json:"threshold_percent" default:"20"` }
func (*ProviderFileSystemUsage) Destroy ¶ added in v1.1.0
func (*ProviderFileSystemUsage) Destroy()
func (*ProviderFileSystemUsage) GetUpdateTaskList ¶ added in v1.1.0
func (provider *ProviderFileSystemUsage) GetUpdateTaskList(ctx context.Context, resultWrapper *ScrapeResultWrapper, storage storage.Storager) UpdateTaskList
func (*ProviderFileSystemUsage) MultipleInstanceAllowed ¶ added in v1.1.0
func (*ProviderFileSystemUsage) MultipleInstanceAllowed() bool
type ProviderPing ¶
type ProviderPing struct { Targets []string `json:"targets"` RetryCount uint `json:"retry_count" default:"3"` }
func (*ProviderPing) Destroy ¶ added in v1.1.0
func (*ProviderPing) Destroy()
func (*ProviderPing) GetUpdateTaskList ¶ added in v1.1.0
func (pingProvider *ProviderPing) GetUpdateTaskList(ctx context.Context, resultWrapper *ScrapeResultWrapper, storage storage.Storager) UpdateTaskList
func (*ProviderPing) MultipleInstanceAllowed ¶
func (pingProvider *ProviderPing) MultipleInstanceAllowed() bool
type ProviderSystemd ¶ added in v1.1.0
type ProviderSystemd struct {
// contains filtered or unexported fields
}
func (*ProviderSystemd) Destroy ¶ added in v1.1.0
func (systemdProvider *ProviderSystemd) Destroy()
func (*ProviderSystemd) GetUpdateTaskList ¶ added in v1.1.0
func (systemdProvider *ProviderSystemd) GetUpdateTaskList(ctx context.Context, resultWrapper *ScrapeResultWrapper, storage storage.Storager) UpdateTaskList
func (*ProviderSystemd) MultipleInstanceAllowed ¶ added in v1.1.0
func (*ProviderSystemd) MultipleInstanceAllowed() bool
type ScrapeResultWrapper ¶ added in v1.1.0
type ScrapeResultWrapper struct {
// contains filtered or unexported fields
}
func MakeScrapeResultWrapper ¶ added in v1.1.0
func MakeScrapeResultWrapper(prefix string, resultChan chan<- any) ScrapeResultWrapper
func (*ScrapeResultWrapper) Metric ¶ added in v1.1.0
func (wrapper *ScrapeResultWrapper) Metric(metricId, name string) MetricWrapper
type UpdateTaskList ¶ added in v1.1.0
type UpdateTaskList []func()
Click to show internal directories.
Click to hide internal directories.