extensionmiddlewaretest

package module
v0.162.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErr

func NewErr(err error) extension.Extension

NewErr returns a new extension.Extension that implements all extensionmiddleware interface and always returns an error.

func NewNop

func NewNop() extension.Extension

NewNop returns a new extension.Extension that implements the all the extensionmiddleware interfaces. For HTTP requests it returns the base RoundTripper and for gRPC requests it returns an empty slice of options.

Types

type RoundTripperFunc

type RoundTripperFunc func(*http.Request) (*http.Response, error)

RoundTripperFunc implements an HTTP client middleware function. This is the equivalent of net/http.HandlerFunc for creating a net/http.RoundTripper from a function.

func (RoundTripperFunc) RoundTrip

func (f RoundTripperFunc) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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