middleware

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Count         = "nats.count"
	ContentLength = "nats.content_length"
	Latency       = "nats.duration"

	Subject = attribute.Key("subject")
	IsError = attribute.Key("error")
)
View Source
const (
	TracerName = "nats"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

func GetChains

func GetChains(chains ...Chain) []Chain

type Metrics

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

func CreateMeasures

func CreateMeasures() *Metrics

type Middleware

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

func NewMiddleware

func NewMiddleware(c ...Chain) *Middleware

func (*Middleware) Then

type Recovery

type Recovery struct{}

func NewRecovery

func NewRecovery() *Recovery

func (*Recovery) Call

type SubMetrics

type SubMetrics struct {
	*Metrics
}

SubMetrics implement Middleware interface

func NewMetrics

func NewMetrics(m *Metrics) *SubMetrics

func (*SubMetrics) Call

type Tracer

type Tracer struct{}

Tracer for subscribers implementing Middleware

func NewTracer

func NewTracer() *Tracer

func (*Tracer) Call

Jump to

Keyboard shortcuts

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