httpx

package
v0.2.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        capkit.ScopeChecker
	Limiter      capkit.Limiter
	Audit        capkit.AuditSink
	Clock        capkit.Clock
	MaxBodyBytes int64
	RateLimit    capkit.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 capkit.ScopeChecker, limiter capkit.Limiter, audit capkit.AuditSink) *Client

func (*Client) Do

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

type Fetcher

type Fetcher struct {
	Base         *http.Client
	Limiter      capkit.Limiter
	Audit        capkit.AuditSink
	Clock        capkit.Clock
	MaxBodyBytes int64
	RateLimit    capkit.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 capkit.Limiter, audit capkit.AuditSink) *Fetcher

func (*Fetcher) Fetch

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

Jump to

Keyboard shortcuts

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