metricsresource

package
v7.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 7 Imported by: 50

Documentation

Index

Constants

View Source
const (
	PrometheusNamespace = "operatorkit"
	PrometheusSubsystem = "controller"
)

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func New

func New(config Config) (resource.Interface, error)

New returns a new metrics resource according to the configured resource's implementation, which might be resource.Interface or crud.Interface. This has then different implications on how to measure metrics for the different methods of the interfaces.

func Wrap

func Wrap(resources []resource.Interface, config WrapConfig) ([]resource.Interface, error)

Wrap wraps each given resource with a metrics resource and returns the list of wrapped resources.

Types

type Config

type Config struct {
	Resource resource.Interface
}

type WrapConfig

type WrapConfig struct {
}

WrapConfig is the configuration used to wrap resources with metrics resources.

Jump to

Keyboard shortcuts

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