httpx

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Base         *http.Client
	Scope        core.ScopeChecker
	Limiter      core.Limiter
	Audit        core.AuditSink
	Clock        core.Clock
	MaxBodyBytes int64
	RateLimit    core.RateLimitSpec
}

Client is the gate-aware HTTPDoer injected into kits. It enforces scope on the initial URL and every redirect hop, and applies per-host rate limiting.

func New

func New(scope core.ScopeChecker, limiter core.Limiter, audit core.AuditSink) *Client

func (*Client) Do

func (c *Client) Do(ctx context.Context, req core.Request) (*core.Response, error)

type Fetcher

type Fetcher struct {
	Base         *http.Client
	Limiter      core.Limiter
	Audit        core.AuditSink
	Clock        core.Clock
	MaxBodyBytes int64
	RateLimit    core.RateLimitSpec
}

Fetcher is the non-target-scoped external download client. It applies rate limiting and audit but deliberately does not enforce project scope (rule updates, GitHub search and threat intel are external infrastructure).

func NewFetcher

func NewFetcher(limiter core.Limiter, audit core.AuditSink) *Fetcher

func (*Fetcher) Fetch

func (f *Fetcher) Fetch(ctx context.Context, req core.Request) (*core.Response, error)

Jump to

Keyboard shortcuts

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