cloudhttp

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Backend = "net/http"

Backend identifies the selected HTTP stack.

Variables

This section is empty.

Functions

func CloseIdleConnections

func CloseIdleConnections(client *http.Client)

CloseIdleConnections releases pooled connections without depending on the concrete transport selected by the build.

func NewClient

func NewClient(opts ClientOptions) *http.Client

NewClient builds the HTTP client used when a service package owns it.

func OperationContext

func OperationContext(ctx context.Context, timeout time.Duration) (context.Context, context.CancelFunc)

OperationContext applies one timeout budget to a complete logical service operation. An earlier caller deadline still wins through context.WithTimeout.

Types

type ClientOptions

type ClientOptions struct {
	Timeout             time.Duration
	MaxIdleConnsPerHost int
}

ClientOptions configures a service-owned HTTP client.

Jump to

Keyboard shortcuts

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