decorator

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decorate

func Decorate(t http.RoundTripper, rts ...Decorator) http.RoundTripper

Decorate is a helper to wrap all the middleware.

Types

type Decorator

type Decorator func(http.RoundTripper) http.RoundTripper

Decorator is a convenience function to represent our middleware inner function.

type TransportFunc

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

TransportFunc implements the RoundTripper interface.

func (TransportFunc) RoundTrip

func (tf TransportFunc) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip just calls the original function.

Jump to

Keyboard shortcuts

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