httptransport

package
v8.0.78 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package httptransport exposes an additive, request-scoped observation seam. A decorator wraps the transport already selected by the executor: it must not replace provider fingerprints, proxy routing, pools, or HTTP protocol policy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decorate

func Decorate(ctx context.Context, client *http.Client) *http.Client

Decorate applies a context decorator AFTER transport selection. With no decorator, the exact original client is returned. Only the client value is copied; the original selected transport/pool and all client policy survive.

func InheritDecorator

func InheritDecorator(ctx, fallback context.Context) context.Context

InheritDecorator copies a decorator from fallback into ctx when ctx does not already specify a decorator or explicit suppression via WithoutDecorator.

func WithDecorator

func WithDecorator(ctx context.Context, decorator Decorator) context.Context

WithDecorator attaches a decorator to one execution context. It does not enable request logging or modify executor credential/selection policy.

func WithoutDecorator

func WithoutDecorator(ctx context.Context) context.Context

WithoutDecorator suppresses intermediate helper decoration. A specialized executor that further configures its helper's transport must apply Decorate once, after its own protocol/pool policy is complete.

Types

type Decorator

type Decorator func(next http.RoundTripper) http.RoundTripper

Decorator may wrap next to observe final HTTP requests and response bodies. It is called during client construction; implementations must be concurrency safe, must delegate to next, and must not retain secrets or consume bodies. A decorator does not observe WebSocket messages after an upgrade.

Jump to

Keyboard shortcuts

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