transferguard

package
v3.3.385 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 2 Imported by: 0 modules, 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 transferguard composes SDK-owned transfer checks without giving a request ownership of its borrowed connection pool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithContext

func WithContext(ctx context.Context, guard Guard) context.Context

func Wrap

Wrap is stateless and may be shared by a cached client. It deliberately does not forward CloseIdleConnections: the pool's existing owner retains cleanup.

Types

type Guard

type Guard interface {
	CheckRequest(*http.Request) error
	CheckResponse(*http.Response) error
}

Guard belongs to one logical request, not to the transport/cache. A rejected response is closed by this package before any higher response observer sees it.

Jump to

Keyboard shortcuts

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