httpclient

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package httpclient provides authentication-aware HTTP transports for upstream requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccessLogTransport added in v0.8.0

func NewAccessLogTransport(base http.RoundTripper, log *accesslog.Logger, logger *slog.Logger) http.RoundTripper

NewAccessLogTransport records each upstream HTTP exchange around base.

Types

type AuthFunc

type AuthFunc func(url string) (headerName, headerValue string)

AuthFunc returns a configured authentication header for a URL.

type Transport

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

Transport adds configured authentication and follows OCI Bearer challenges.

func NewTransport

func NewTransport(base http.RoundTripper, authForURL AuthFunc) *Transport

NewTransport creates an authentication-aware transport around base.

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements http.RoundTripper.

Jump to

Keyboard shortcuts

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