resetter

package
v0.0.0-...-a649549 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

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

Error describes a resetter error

func NewError

func NewError(bt []string) *Error

NewError returns a new empty resetter.Error

func (*Error) Error

func (re *Error) Error() string

Error returns the error string

func (*Error) Reason

func (re *Error) Reason() []string

Reason describes the error on multiple lines

type Interface

type Interface interface {
	// Name uniquely identifies this instance
	Name() string

	// Provides lists the models a resetter resets
	Provides() []string

	// ToProto marshals a resetter.Interface implementation into a *fm.Clt_Fuzz_Resetter
	ToProto() *fm.Clt_Fuzz_Resetter

	// Env passes envs read during startup
	Env(read map[string]string)

	// ExecStart executes the setup phase of the System Under Test
	ExecStart(context.Context, io.Writer, io.Writer, bool) error
	// ExecReset resets the System Under Test to a state similar to a post-ExecStart state
	ExecReset(context.Context, io.Writer, io.Writer, bool) error
	// ExecStop executes the cleanup phase of the System Under Test
	ExecStop(context.Context, io.Writer, io.Writer, bool) error

	// Terminate cleans up after a resetter.Interface implementation instance
	Terminate(context.Context, io.Writer, io.Writer) error
}

Interface describes ways to reset the system under test to a known initial state A package defining a type that implements Interface also has to define: * a non-empty const Name that names the Starlark builtin * a func of type Maker named New that instanciates a new resetter

type Maker

type Maker func(kwargs []starlark.Tuple) (Interface, error)

Maker types the New func that instanciates new resetters

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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