transport

package
v0.13.0-alpha.99 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogTransport

func NewLogTransport(baseTransport http.RoundTripper, logger *slog.Logger, minElapsed time.Duration) http.RoundTripper

func NewTransport

func NewTransport(opts ...Option) (http.RoundTripper, error)

Types

type Option

type Option func(c *Transport) error

func WithBaseTransport

func WithBaseTransport(baseTransport http.RoundTripper) Option

func WithLogger

func WithLogger(logger *slog.Logger) Option

func WithUserAndPass

func WithUserAndPass(userAndPass []string) Option

type Transport

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

func (*Transport) RoundTrip

func (c *Transport) 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