outputtest

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RawRecorderDesc = baker.OutputDesc{
	Name:   "RawRecorder",
	New:    NewRecorder,
	Config: &RecorderConfig{},
	Raw:    true,
}

RawRecorderDesc describes the RawRecorder debug output.

View Source
var RecorderDesc = baker.OutputDesc{
	Name:   "Recorder",
	New:    NewRecorder,
	Config: &RecorderConfig{},
	Raw:    false,
}

RecorderDesc describes the Recorder debug output.

Functions

func NewRecorder

func NewRecorder(cfg baker.OutputParams) (baker.Output, error)

NewRecorder returns a new Recorder output.

Types

type Base

type Base struct{}

Base is a nop implementation of baker.Output useful to be embedded in tests and to redeclare one or more methods.

func (Base) CanShard

func (Base) CanShard() bool

func (Base) Run

func (Base) Run(_ <-chan baker.OutputRecord, _ chan<- string) error

func (Base) Stats

func (Base) Stats() baker.OutputStats

type Recorder

type Recorder struct {
	Records []baker.OutputRecord
}

A Recorder output appends all received records, useful for examination in tests.

func (*Recorder) CanShard

func (r *Recorder) CanShard() bool

CanShard implements baker.Output interface.

func (*Recorder) Run

func (r *Recorder) Run(input <-chan baker.OutputRecord, _ chan<- string) error

Run implements baker.Output interface.

func (*Recorder) Stats

func (r *Recorder) Stats() baker.OutputStats

Stats implements baker.Output interface.

type RecorderConfig

type RecorderConfig struct{}

A RecorderConfig specifies the Recorder configuration.

Jump to

Keyboard shortcuts

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