resultframe

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package resultframe extracts one exact, integrity-bound runner result from an acceptance Pod's log. It reuses the production parser, so an acceptance row cannot accept a frame the controller would reject. Legacy acceptance Jobs use this parser; durable Jobs are read from result storage.

Index

Constants

View Source
const (

	// MaxLogBytes bounds a log the parser reads: the largest frame the runner
	// writes, and a megabyte of output before it.
	MaxLogBytes = runner.DefaultMaxFrameBytes + 1<<20
)

Variables

This section is empty.

Functions

func Parse

func Parse(logs []byte, operation runner.Operation, operationID string) (runner.Result, error)

Parse reads the one frame the log must hold. It separates the two answers a caller that can read the log again has to decide between, because one sentence covering both is a refusal such a caller cannot act on.

Fewer markers than a closed frame carries is a log read while the runner's last write was still being copied into it: the frame may still be arriving, and reading again can produce it. Nothing is decided here for that case. runner.ParseResultWithOptions already separates a header that has not finished, a payload short of the length its header declares and a payload with no footer from a frame that is present and malformed, and it names each. Answering all of them with a sentence of this package's own is what hid them: the callers that read a transport again do so only for the parser's own incomplete reasons, so from #155 until this was split, a log that was still arriving was refused on its first read and the bounded wait never ran for the case it was written for.

More than one header or footer is the other answer. The log is all there and holds more than the one frame this package extracts -- the production parser returns the last valid frame it finds, so it would accept a log carrying two -- and no later read can reduce them. That refusal says so, in words no caller mistakes for a reason to wait.

func StillArriving

func StillArriving(err error) bool

StillArriving reports whether err is a refusal a later read of the same log can turn into a frame.

Types

This section is empty.

Jump to

Keyboard shortcuts

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