http_round_tripper

package
v1.21.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 3 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 {
	// contains filtered or unexported fields
}

type Factory

type Factory func(next http.RoundTripper, opts ...Option) http.RoundTripper

Factory creates middleware instances. Created by NewFactory.

func NewFactory

func NewFactory(opts ...FactoryOption) Factory

NewFactory will create a function for creating metric middlewares. The resulting function can be called multiple times to obtain multiple middleware instances. Each instance can be configured with different options that will be applied to the same underlying metrics.

type FactoryOption

type FactoryOption func(*factoryConfig)

FactoryOption is used to pass options in NewFactory.

func WithLabels

func WithLabels(labels ...string) FactoryOption

WithLabels will configure additional labels to apply to the metrics.

func WithNamespace

func WithNamespace(namespace string) FactoryOption

WithNamespace will configure the namespace to apply to the metrics.

func WithRequestDurationBuckets

func WithRequestDurationBuckets(buckets []float64) FactoryOption

WithRequestDurationBuckets will configure the duration buckets used for incoming request histogram buckets.

type Option

type Option func(*Config)

Option is used to pass options to the Factory instance.

func WithLabelValues

func WithLabelValues(labelValues map[string]string) Option

WithLabelValues will configure labels values to apply to this round tripper.

Jump to

Keyboard shortcuts

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