instutil

package
v3.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BucketScale

func BucketScale(factor float64, values ...float64) []float64

func Counter

func Counter(ctx context.Context, name string) (prometheus.Counter, bool)

func CounterVec

func CounterVec(ctx context.Context, name string) (*prometheus.CounterVec, bool)

func Gauge

func Gauge(ctx context.Context, name string) (prometheus.Gauge, bool)

func GaugeVec

func GaugeVec(ctx context.Context, name string) (*prometheus.GaugeVec, bool)

func Histogram

func Histogram(ctx context.Context, name string) (prometheus.Histogram, bool)

func NewCounter

func NewCounter(ctx context.Context, name string) context.Context

func NewCounterVec

func NewCounterVec(ctx context.Context, name string, labels ...string) context.Context

func NewGauge

func NewGauge(ctx context.Context, name string) context.Context

func NewGaugeVec

func NewGaugeVec(ctx context.Context, name string, labels ...string) context.Context

func NewHistogram

func NewHistogram(ctx context.Context, name string, buckets ...float64) context.Context

func NewTransitionCollector

func NewTransitionCollector(ctx context.Context, name string) context.Context

Types

type Transition

type Transition struct {
	Name     string
	From, To string
	Fields   logrus.Fields
}

type TransitionCollector

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

func GetTransitionCollector

func GetTransitionCollector(ctx context.Context, name string) *TransitionCollector

func (*TransitionCollector) Finish

func (c *TransitionCollector) Finish() []Transition

func (*TransitionCollector) Observe

func (c *TransitionCollector) Observe(name string, state string, fields logrus.Fields)

Jump to

Keyboard shortcuts

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