web2

package
v0.0.48 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package web2 executes web2 (HTTP) read requests: it fetches the declared endpoint, extracts the declared JSON fields, and canonically encodes them so read results are byte-identical across validators.

Index

Constants

View Source
const (
	// DestinationPrefix identifies web2 read destinations, e.g. "web2:https".
	DestinationPrefix = "web2:"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

Executor implements common.ReadRequestHandler for web2 destinations.

func NewExecutor

func NewExecutor(logger zerolog.Logger) *Executor

NewExecutor creates a web2 read executor. Its HTTP client dials through an SSRF guard that blocks private/internal addresses on the initial request and on every redirect hop, and only connects to the exact IP it vetted (so DNS rebinding cannot swap in an internal address between check and dial).

func (*Executor) ExecuteRead

ExecuteRead fetches the endpoint declared in the envelope, extracts the declared fields, and abi-encodes them in extract order. Deterministic failures (bad envelope, non-JSON response, missing path, 4xx) are votable ERROR observations; transport failures and 5xx are transient errors.

Jump to

Keyboard shortcuts

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