collector

package
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsInvalidExecution

func IsInvalidExecution(err error) bool

IsInvalidExecution asserts invalidExecutionError.

Types

type App added in v1.1.10

type App struct {
	// contains filtered or unexported fields
}

App is the main struct for this collector.

func NewApp added in v1.1.10

func NewApp(config AppConfig) (*App, error)

NewApp creates a new App metrics collector

func (*App) Collect added in v1.1.10

func (c *App) Collect(ch chan<- prometheus.Metric) error

Collect is the main metrics collection function.

func (*App) Describe added in v1.1.10

func (c *App) Describe(ch chan<- *prometheus.Desc) error

Describe emits the description for the metrics collected here.

type AppConfig added in v1.1.10

type AppConfig struct {
	K8sClient k8sclient.Interface
	Logger    micrologger.Logger

	AppTeamMapping map[string]string
	DefaultTeam    string
	UniqueApp      bool
}

AppConfig is this collector's configuration struct.

type AppOperator added in v1.1.10

type AppOperator struct {
	// contains filtered or unexported fields
}

AppOperator is the main struct for this collector.

func NewAppOperator added in v1.1.10

func NewAppOperator(config AppOperatorConfig) (*AppOperator, error)

NewAppOperator creates a new AppOperator metrics collector

func (*AppOperator) Collect added in v1.1.10

func (a *AppOperator) Collect(ch chan<- prometheus.Metric) error

Collect is the main metrics collection function.

func (*AppOperator) Describe added in v1.1.10

func (a *AppOperator) Describe(ch chan<- *prometheus.Desc) error

Describe emits the description for the metrics collected here.

type AppOperatorConfig added in v1.1.10

type AppOperatorConfig struct {
	K8sClient k8sclient.Interface
	Logger    micrologger.Logger
}

AppOperatorConfig is this collector's configuration struct.

type Set

type Set struct {
	*collector.Set
}

Set is basically only a wrapper for the operator's collector implementations. It eases the iniitialization and prevents some weird import mess so we do not have to alias packages.

func NewSet

func NewSet(config SetConfig) (*Set, error)

type SetConfig

type SetConfig struct {
	K8sClient k8sclient.Interface
	Logger    micrologger.Logger

	AppTeamMapping map[string]string
	DefaultTeam    string
	UniqueApp      bool
}

Jump to

Keyboard shortcuts

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