monitoringdisabledresource

package
v1.27.3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Apache-2.0 Imports: 5 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 New

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

New returns a new monitoring disabled wrapper 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 disabled monitoring resource and returns the list of wrapped resources.

Types

type Config

type Config struct {
	Resource resource.Interface
	Logger   micrologger.Logger
}

type WrapConfig

type WrapConfig struct {
	Logger micrologger.Logger
}

WrapConfig is the configuration used to wrap resources with disabled monitoring resource.

Jump to

Keyboard shortcuts

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