Documentation
¶
Overview ¶
Package telemetry comment
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetSegmentIOClient ¶ added in v1.3.0
func TrackClusterIPAMCreate ¶ added in v1.4.0
Types ¶
type Collector ¶ added in v1.3.0
type Collector interface {
// Called periodically by the controller to trigger a collection round.
Collect(context.Context) error
// Called once during shutdown to release resources and flush final data.
Close(context.Context) error
}
Collector is the generic interface for a telemetry collector.
type Config ¶ added in v1.3.0
type Config struct {
MgmtClient client.Client
Mode Mode
SystemNamespace string
LocalBaseDir string
Interval time.Duration
JitterPercentage uint // ie 10%
Concurrency int
}
Config configurates Telemetry Collector.
type Mode ¶ added in v1.3.0
type Mode string //nolint:recvcheck // invalid in this case
Mode defines the way telemetry is collected and stored.
type Opt ¶ added in v1.3.0
type Opt func(*Config)
Opt is an optional function to change the Config.
func UseFlagOptions ¶ added in v1.3.0
UseFlagOptions configures the telemetry runner to use the Config set by parsing telemetry options flags from the CLI.
Note: not all options can be set via flags, e.g. MgmtClient cannot be set in that manner.
cfg := &telemetry.Config{MgmtClient: cl}
cfg.BindFlags(flag.CommandLine)
flag.Parse()
runner, err := telemetry.NewRunner(telemetry.UseFlagOptions(cfg))
Click to show internal directories.
Click to hide internal directories.