capture

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package capture records provider-independent stdio JSONL with owned process lifecycle, lossless native JSON, and explicit failure evidence.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, o ConnectOptions, streams IO) error

func Run

func Run(ctx context.Context, o Options, streams IO) error

Run owns streams for one invocation and reports capture failures without CLI exit codes. Native version and proxy identity are supplied, never probed.

Types

type ConnectOptions

type ConnectOptions struct {
	URL            string
	TokenFile      string
	MaxFrameBytes  int64
	ConnectTimeout time.Duration
}

func (ConnectOptions) Validate

func (o ConnectOptions) Validate() error

Validate checks the private target without opening a connection.

type Error

type Error struct {
	Kind ErrorKind
	Err  error
}

Error retains the underlying failure and its capture outcome.

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type ErrorKind

type ErrorKind string

ErrorKind describes capture outcomes; callers choose their own exit codes.

const (
	Configuration ErrorKind = "configuration"
	Canceled      ErrorKind = "canceled"
	Failure       ErrorKind = "failure"
)

type IO

type IO struct{ In, Out, Err *os.File }

IO supplies process descriptors so capture can interrupt blocked reads and writes. Run owns their use for one invocation, not the caller's descriptors.

type Options

type Options struct {
	Output         string
	ProcessFile    string
	CWD            string
	Env            []string
	ClearEnv       bool
	Remote         *ConnectOptions
	Command        []string
	NativeVersion  string
	ProxyVersion   string
	StdinEOFAction string
	Timeout        time.Duration
	ProtocolBytes  int64
	StderrBytes    int64
	MaxFrames      int64
	MaxFrameBytes  int64
	CleanupTimeout time.Duration
}

Options describes a single capture, independently of command-line parsing. Output must not exist. ProxyVersion identifies the caller's capture binary in the provenance manifest; it does not constrain native executable versions.

Jump to

Keyboard shortcuts

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