features

package
v0.0.47 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature added in v0.0.29

type Feature struct {
	Name        string
	Description string
	Labels      map[string]string
	// contains filtered or unexported fields
}

func New added in v0.0.29

func New(name string, opts ...Option) *Feature

func (*Feature) Test added in v0.0.29

func (f *Feature) Test(ctx context.Context) error

Test executes the steps in the feature. The "before" steps are executed first, followed by the "assessments", followed by the "afters". On failures, the steps are short-circuited to the "afters". The "afters" are _always_ run.

func (*Feature) WithAfter added in v0.0.29

func (f *Feature) WithAfter(name string, fn StepFn, opts ...StepOpt)

func (*Feature) WithAssessment added in v0.0.29

func (f *Feature) WithAssessment(name string, fn StepFn, opts ...StepOpt)

func (*Feature) WithBefore added in v0.0.29

func (f *Feature) WithBefore(name string, fn StepFn, opts ...StepOpt)

type Level added in v0.0.29

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

type Option added in v0.0.29

type Option func(*Feature)

func WithDescription added in v0.0.29

func WithDescription(desc string) Option

type StepFn added in v0.0.29

type StepFn func(context.Context) error

type StepOpt added in v0.0.10

type StepOpt func(s *step)

func StepWithRetry added in v0.0.29

func StepWithRetry(backoff wait.Backoff) StepOpt

StepWithRetry wraps the step in an exponential backoff retry loop.

Jump to

Keyboard shortcuts

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