network

package
v1.35.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggingRoundTripper

type LoggingRoundTripper struct {
	Base http.RoundTripper
	Log  *slog.Logger
}

LoggingRoundTripper is an http.RoundTripper that logs requests and responses

func NewLoggingRoundTripper

func NewLoggingRoundTripper(logger *slog.Logger, base http.RoundTripper) *LoggingRoundTripper

NewLoggingRoundTripper creates a new LoggingRoundTripper with the given logger

func (*LoggingRoundTripper) RoundTrip

func (lrt *LoggingRoundTripper) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip implements the RoundTripper interface

type PresignedSplitTransport

type PresignedSplitTransport struct {
	Base      http.RoundTripper
	Presigned http.RoundTripper
}

PresignedSplitTransport sends pre-signed storage requests through Presigned and everything else through Base.

It exists because the HAProxy setup relaxes TLS verification: the internal address does not match the certificate. That concession is for the API, not for a request leaving to storage, whose host is genuine.

func (*PresignedSplitTransport) RoundTrip

func (t *PresignedSplitTransport) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip implements the RoundTripper interface.

Jump to

Keyboard shortcuts

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