Documentation ¶
Index ¶
Constants ¶
View Source
const (
MaxItemSize = 1024 * 1500
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector is an execution-scoped object encapsulating the entire collection process.
func New ¶
func New( clusterID string, clusterConfig *rest.Config, conf *config.Config, dataCollectors ...DataCollector, ) *Collector
New creates a new instance of the Collector struct. A Kubernetes cluster ID must be provided, together with a configuration object and a list of objects implementing the DataCollector interface.
The cluster ID is a string of alphanumeric characters, dashes and underscores, of any length. Spaces are not allowed.
A configuration object must be provided.
type DataCollector ¶
type DataCollector interface { // Source is a method that returns a unique name for the collector source Source() string // Run executes the data collector. The configuration object is always passed // and is never empty or nil. Every collector must return a name for the // key under which the data will be sent to the Infralight App Server, the // data itself (which is a list of arbitrary objects), and an optional error. Run(context.Context, *config.Config) ( keyName string, data []interface{}, err error, ) }
DataCollector is an interface for objects that collect data from K8s-related components such as the Kubernetes API Server or Helm
Click to show internal directories.
Click to hide internal directories.