metrics

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Env envvar.Env
	Log logger.Interface
	Met metric.Meter
}

type Handler

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

func New

func New(c Config) *Handler

func (*Handler) Attach

func (h *Handler) Attach(rtr *mux.Router, opt ...interface{})

func (*Handler) Counter

func (h *Handler) Counter(ctx context.Context, req *metrics.CounterI) (*metrics.CounterO, error)

func (*Handler) Gauge

func (h *Handler) Gauge(ctx context.Context, req *metrics.GaugeI) (*metrics.GaugeO, error)

func (*Handler) Histogram

func (h *Handler) Histogram(ctx context.Context, req *metrics.HistogramI) (*metrics.HistogramO, error)

type Request added in v0.1.2

type Request interface {
	GetAction() []*metrics.Action
}

Jump to

Keyboard shortcuts

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