http

package
v1.0.1-0...-d5ce356 Latest Latest
Warning

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

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

Documentation

Overview

Package http defines public outbound HTTP capabilities without runtime or concrete transport dependencies. Clients are borrowed from injected providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Do(request *http.Request) (*http.Response, error)
}

Client executes explicit HTTP requests. Request contexts control cancellation. The caller closes each response body; the provider owner manages connections.

type Options

type Options struct {
	URL    string            `json:"url"`
	Method string            `json:"method"`
	Header map[string]string `json:"header,omitempty"`
	client.Limits
}

Options describes an explicit HTTP destination and its defaults. Dynamic credentials belong on the request, not in deployment constants.

type Provider

type Provider interface {
	Client(ctx context.Context, options Options) (Client, error)
}

Provider resolves or reuses a client from deployment-owned typed options. Runtime composition injects implementations. Callers do not own the provider or client and must not close their connection pools.

Jump to

Keyboard shortcuts

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