stub

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package stub provides interfaces and stub implementations.

Packages in mox use these interfaces and implementations so other software reusing these packages won't have to take on unwanted dependencies.

Stubs are provided for: metrics (prometheus).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPClientObserveIgnore

func HTTPClientObserveIgnore(ctx context.Context, log *slog.Logger, pkg, method string, statusCode int, err error, start time.Time)

Types

type Counter

type Counter interface {
	Inc()
}

type CounterIgnore

type CounterIgnore struct{}

func (CounterIgnore) Inc

func (CounterIgnore) Inc()

type CounterVec

type CounterVec interface {
	IncLabels(labels ...string)
}

type CounterVecIgnore

type CounterVecIgnore struct{}

func (CounterVecIgnore) IncLabels

func (CounterVecIgnore) IncLabels(labels ...string)

type Histogram

type Histogram interface {
	Observe(float64)
}

type HistogramIgnore

type HistogramIgnore struct{}

func (HistogramIgnore) Observe

func (HistogramIgnore) Observe(float64)

type HistogramVec

type HistogramVec interface {
	ObserveLabels(v float64, labels ...string)
}

type HistogramVecIgnore

type HistogramVecIgnore struct{}

func (HistogramVecIgnore) ObserveLabels

func (HistogramVecIgnore) ObserveLabels(v float64, labels ...string)

Jump to

Keyboard shortcuts

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