metric

package
v17.1.0-rc1 Latest Latest
Warning

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

Go to latest
Published: May 21, 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

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

type AllowLimiterInstrumentation

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

func NewAllowLimiterInstrumentation

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

func (*AllowLimiterInstrumentation) Allow

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

type LimiterWrapper

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

func NewLimiterWrapper

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

func (*LimiterWrapper) Start

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

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

type WaitLimiterInstrumentation

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

func NewWaitLimiterInstrumentation

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

func (*WaitLimiterInstrumentation) Wait

Jump to

Keyboard shortcuts

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