collectors

package
v0.0.0-...-bea810b Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Collectors = map[string]CollectorFactory{}

Functions

func BuildConfigurationOptions

func BuildConfigurationOptions() (map[string]config.Configuration, error)

func GetCollectorNames

func GetCollectorNames(defaultOnly bool) []string

func Register

func Register(name string, collector CollectorFactory)

Register can be called from init() on a collector in this package It will automatically be added to the Collectors map to be called externally

Types

type Collector

type Collector interface {
	Collect(config config.Configuration) (*data.DiagnosticBundle, error)
	Configuration() config.Configuration
	IsDefault() bool
	Description() string
}

func GetCollectorByName

func GetCollectorByName(name string) (Collector, error)

type CollectorFactory

type CollectorFactory func() (Collector, error)

CollectorFactory lets us use a closure to get instances of the collector struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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