gatherers

package
v0.0.0-...-8b9bd6b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomPeriodGatherer

type CustomPeriodGatherer interface {
	Interface

	// ShouldBeProcessedNow returns true when it's time to process the gatherer
	// is responsible for tracking the time itself
	ShouldBeProcessedNow() bool
	// UpdateLastProcessingTime is called when the gatherer is about to be processed,
	// so that it can update its last processed time for example.
	UpdateLastProcessingTime()
}

CustomPeriodGatherer gatherers implementing this interface may not get to each archive and their period can be different from interval in the config(equal or higher, but never lower)

type GathererUsingRemoteConfig

type GathererUsingRemoteConfig interface {
	Interface

	// RemoteConfigStatus provides information about the availability and validity of the remote configuration
	// used as source of the data gathering
	RemoteConfigStatus() RemoteConfigStatus
}

type GatheringClosure

type GatheringClosure struct {
	Run func(context.Context) ([]record.Record, []error)
}

GatheringClosure is a struct containing a closure each gatherer returns

type Interface

type Interface interface {
	// GetName returns the name of the gatherer
	GetName() string

	// GetGatheringFunctions returns all the gathering function implemented by current gatherer
	GetGatheringFunctions(context.Context) (map[string]GatheringClosure, error)
}

Interface is an interface for gathering types

type RemoteConfigStatus

type RemoteConfigStatus struct {
	Err             error
	AvailableReason string
	ValidReason     string
	ConfigData      []byte
	ConfigAvailable bool
	ConfigValid     bool
}

RemoteConfigStatus is a struct providing information about the availability and validity of the remote configuration

Directories

Path Synopsis
nolint: dupl
nolint: dupl
Package conditional provides conditional gatherer which runs gatherings based on the rules and only if the provided conditions are satisfied.
Package conditional provides conditional gatherer which runs gatherings based on the rules and only if the provided conditions are satisfied.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL