collectors

package
v0.0.0-...-434f714 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DisabledCollectorError = errors.Sentinel("collector is disabled")
)

Functions

func GetMetadataCollector

func GetMetadataCollector(cfg Config, logger logr.Logger) metadatax.Collector

Types

type AzureCollectorConfig

type AzureCollectorConfig struct {
	BaseConfig `json:",inline" mapstructure:",squash"`
}

func (AzureCollectorConfig) Instantiate

func (c AzureCollectorConfig) Instantiate() (metadatax.Collector, error)

func (*AzureCollectorConfig) Validate

func (c *AzureCollectorConfig) Validate() error

type BaseConfig

type BaseConfig struct {
	Enabled *bool `json:"enabled,omitempty"`
}

func (*BaseConfig) IsEnabled

func (c *BaseConfig) IsEnabled() bool

type Config

type Config struct {
	ProcFS   ProcFSCollectorConfig   `json:"procfs,omitempty"`
	LinuxOS  LinuxOSCollectorConfig  `json:"linuxos,omitempty"`
	SysFSDMI SysFSDMICollectorConfig `json:"sysfsdmi,omitempty"`

	Azure AzureCollectorConfig `json:"azure,omitempty"`
	EC2   EC2CollectorConfig   `json:"ec2,omitempty"`
	GCP   GCPCollectorConfig   `json:"gcp,omitempty"`

	Docker     DockerCollectorConfig     `json:"docker,omitempty"`
	Kubernetes KubernetesCollectorConfig `json:"kubernetes,omitempty"`
}

func (Config) Validate

func (c Config) Validate() (Config, error)

type CredentialType

type CredentialType string
const (
	JWTCredentialType  CredentialType = "JWT"
	X509CredentialType CredentialType = "X509"
)

type Credentials

type Credentials struct {
	CredentialType CredentialType

	// jwt
	Token string

	// x509
	CertPEM []byte
	KeyPEM  []byte
}

type DockerCollectorConfig

type DockerCollectorConfig struct {
	BaseConfig `json:",inline" mapstructure:",squash"`

	SocketPath string `json:"socketPath,omitempty"`
}

func (DockerCollectorConfig) Instantiate

func (c DockerCollectorConfig) Instantiate() (metadatax.Collector, error)

func (*DockerCollectorConfig) Validate

func (c *DockerCollectorConfig) Validate() error

type EC2CollectorConfig

type EC2CollectorConfig struct {
	BaseConfig `json:",inline" mapstructure:",squash"`
}

func (EC2CollectorConfig) Instantiate

func (c EC2CollectorConfig) Instantiate() (metadatax.Collector, error)

func (*EC2CollectorConfig) Validate

func (c *EC2CollectorConfig) Validate() error

type GCPCollectorConfig

type GCPCollectorConfig struct {
	BaseConfig `json:",inline" mapstructure:",squash"`
}

func (GCPCollectorConfig) Instantiate

func (c GCPCollectorConfig) Instantiate() (metadatax.Collector, error)

func (*GCPCollectorConfig) Validate

func (c *GCPCollectorConfig) Validate() error

type KubernetesCollectorConfig

type KubernetesCollectorConfig struct {
	BaseConfig `json:",inline" mapstructure:",squash"`

	KubeletHost             string `json:"kubeletHost,omitempty"`
	KubeletPort             int    `json:"kubeletPort,omitempty"`
	KubeletCA               string `json:"kubeletCA,omitempty"`
	SkipKubeletVerification *bool  `json:"skipKubeletVerification,omitempty"`
	Credentials             string `json:"credentials,omitempty"`
}

func (KubernetesCollectorConfig) GetCredentials

func (c KubernetesCollectorConfig) GetCredentials() (cred Credentials, err error)

func (KubernetesCollectorConfig) Instantiate

func (*KubernetesCollectorConfig) Validate

func (c *KubernetesCollectorConfig) Validate() error

type LinuxOSCollectorConfig

type LinuxOSCollectorConfig struct {
	BaseConfig `json:",inline" mapstructure:",squash"`
}

func (LinuxOSCollectorConfig) Instantiate

func (c LinuxOSCollectorConfig) Instantiate() (metadatax.Collector, error)

func (*LinuxOSCollectorConfig) Validate

func (c *LinuxOSCollectorConfig) Validate() error

type ProcFSCollectorConfig

type ProcFSCollectorConfig struct {
	BaseConfig `json:",inline" mapstructure:",squash"`

	ExtractEnvs *bool `json:"extractEnvs,omitempty"`
}

func (ProcFSCollectorConfig) Instantiate

func (c ProcFSCollectorConfig) Instantiate() (metadatax.Collector, error)

func (*ProcFSCollectorConfig) Validate

func (c *ProcFSCollectorConfig) Validate() error

type SysFSDMICollectorConfig

type SysFSDMICollectorConfig struct {
	BaseConfig `json:",inline" mapstructure:",squash"`
}

func (SysFSDMICollectorConfig) Instantiate

func (c SysFSDMICollectorConfig) Instantiate() (metadatax.Collector, error)

func (*SysFSDMICollectorConfig) Validate

func (c *SysFSDMICollectorConfig) Validate() error

Jump to

Keyboard shortcuts

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