types

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment interface {
	// Test executes a feature(set) against the environment.
	Test(context.Context, Feature) error
}

type Feature

type Feature interface {
	Name() string
	Labels() map[string]string
	Steps() []Step
}

type Harness

type Harness interface {
	// Setup returns the Step that creates the harness and signals the caller is
	// using the harness.
	Setup() StepFn

	// Finish returns the StepFn that signals the caller is done with the
	// harness.
	Finish() StepFn

	// Destroy destroys the harness.
	Destroy(context.Context) error

	// Done blocks until all callers of the harness are done with it.
	Done() error

	// StepFn returns a StepFn that executes the given command in the harness.
	StepFn(config StepConfig) StepFn
}

type Level

type Level uint8
const (
	Before Level = iota
	Assessment
	After
)

type Step

type Step interface {
	Name() string
	Fn() StepFn
	Level() Level
}

type StepConfig added in v0.0.3

type StepConfig struct {
	// the command that the step should run
	Command string

	// the working directory where the step should run
	WorkingDir string
}

type StepFn

type StepFn func(ctx context.Context) (context.Context, error)

Jump to

Keyboard shortcuts

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