conncount

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transport

type Transport struct {
	*http.Transport
	// contains filtered or unexported fields
}

Transport defines a transport with build-in connection counter Usage: func callback(n int64) { x.metrics.ConnectionGauge(n) } transport := conncount.NewTransport(logger, logFields, &http.Transport{}, callback) httpClient := &httpClient{Transport: transport}

func NewTransport

func NewTransport(logger log.MetaLogger, prev *http.Transport, callback func(int64)) *Transport

NewTransport creates Transport with a connection counter. prev is a Transport to be wrapped. callback is a function to be called when connection counter changes.

Jump to

Keyboard shortcuts

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