monitoring

package
v0.0.0-...-ded4385 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToScheme

func AddToScheme(scheme *runtime.Scheme) error

AddToScheme adds monitoring types to the scheme

Types

type Timer

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

Timer is a helper type to time functions. Use NewTimer to create new instances.

func NewTimer

func NewTimer() *Timer

NewTimer creates a new Timer.

func (*Timer) ObserveDurationInSeconds

func (t *Timer) ObserveDurationInSeconds(o prometheus.Observer) time.Duration

ObserveDurationInSeconds records the duration passed since the Timer was created with NewTimer. It calls the Observe method of the provided Observer. The observed duration is also returned.

Jump to

Keyboard shortcuts

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