http

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultMaxBodyBytes = int64(1 << 20)

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckpointLister

type CheckpointLister interface {
	ListRunCheckpoints(ctx context.Context, runID string, limit int) (any, error)
}

type CheckpointLoader

type CheckpointLoader interface {
	GetRunCheckpoint(ctx context.Context, runID string, version int64) (any, error)
}

type CheckpointResumer

type CheckpointResumer interface {
	ResumeFromCheckpoint(ctx context.Context, runID string, version int64) (any, error)
}

type Handler

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

func NewHandler

func NewHandler(config HandlerConfig) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w nethttp.ResponseWriter, r *nethttp.Request)

type HandlerConfig

type HandlerConfig struct {
	Checkpoint   StepResumer
	Steps        StepsLister
	History      CheckpointLister
	Checkpoints  CheckpointLoader
	Restore      CheckpointResumer
	Fork         RunForker
	MaxBodyBytes int64
	// Policy authorizes requests, mirroring the async run handler: reads are
	// authorized as run.read and writes (resume-from-step,
	// resume-from-checkpoint, fork) as hitl.resume / run.submit. When Policy
	// is nil, write endpoints default-deny with 403 auth_required unless
	// InsecureAllowNoAuth explicitly opts out.
	Policy security.Policy
	// Audit receives policy-denied records when configured.
	Audit audit.Sink
	// InsecureAllowNoAuth disables the default-deny protection on write
	// endpoints when no Policy is configured. Only set this behind an
	// authenticating reverse proxy or in tests.
	InsecureAllowNoAuth bool
}

type RunForker

type RunForker interface {
	ForkRun(ctx context.Context, runID string, version int64) (any, error)
}

type StepResumer

type StepResumer interface {
	ResumeFromStep(ctx context.Context, runID, nodeID string) (any, error)
}

type StepsLister

type StepsLister interface {
	ListRunSteps(ctx context.Context, runID string) (any, error)
}

Jump to

Keyboard shortcuts

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