metric

package
v16.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(registerer prometheus.Registerer, toRegister ...prometheus.Collector) error

Types

type AllowLimiter added in v16.5.0

type AllowLimiter interface {
	Allow(context.Context) bool
}

type AllowLimiterInstrumentation added in v16.5.0

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

func NewAllowLimiterInstrumentation added in v16.5.0

func NewAllowLimiterInstrumentation(limiterName string, limit float64, limitUnit string, tr trace.Tracer, m otelmetric.Meter, delegate AllowLimiter) (*AllowLimiterInstrumentation, error)

func (*AllowLimiterInstrumentation) Allow added in v16.5.0

func (i *AllowLimiterInstrumentation) Allow(ctx context.Context) (allowed bool)

type LimiterWrapper added in v16.5.0

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

func NewLimiterWrapper added in v16.5.0

func NewLimiterWrapper(limiterName string, limit float64, limitUnit string, m otelmetric.Meter, tr trace.Tracer) (*LimiterWrapper, error)

func (*LimiterWrapper) Start added in v16.5.0

func (w *LimiterWrapper) Start(ctx context.Context) (context.Context, func(allowed bool))

type OtelErrorHandler

type OtelErrorHandler zap.Logger

func (*OtelErrorHandler) Handle

func (h *OtelErrorHandler) Handle(err error)

type WaitLimiter added in v16.5.0

type WaitLimiter interface {
	Wait(context.Context) error
}

type WaitLimiterInstrumentation added in v16.5.0

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

func NewWaitLimiterInstrumentation added in v16.5.0

func NewWaitLimiterInstrumentation(limiterName string, limit float64, limitUnit string, tr trace.Tracer, m otelmetric.Meter, delegate WaitLimiter) (*WaitLimiterInstrumentation, error)

func (*WaitLimiterInstrumentation) Wait added in v16.5.0

Jump to

Keyboard shortcuts

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