testoutput

package
v1.0.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 4 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 testoutput supplies detached, buffered output for hosted test spies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Collect

func Collect(output api.Output, err error) (content *api.Content, resultErr error)

Collect observes a Run outcome in tests that are about behavior other than the output-handle lifecycle. Lifecycle tests consume their handles directly.

func New

func New(ctx context.Context, content *api.Content, err error) api.Output

New returns a handle even for absent content or a terminal execution failure.

Types

type Buffered

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

Buffered is a test implementation whose terminal outcome is configured at construction.

func (*Buffered) Close

func (o *Buffered) Close() error

Close records abandonment without certifying the terminal execution outcome.

func (*Buffered) Collect

func (o *Buffered) Collect(ctx context.Context) (*api.Content, error)

Collect detaches configured content through the same one-shot admission.

func (*Buffered) Consume

func (o *Buffered) Consume(ctx context.Context, consumer api.Consumer) error

Consume delivers one borrowed chunk, including present empty content.

func (*Buffered) Metadata

func (o *Buffered) Metadata() api.Metadata

Metadata preserves the configured descriptor, including unknown length.

Jump to

Keyboard shortcuts

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