base

package
v0.0.0-...-e617ea9 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Delegate

type Delegate interface {
	Prepare(ctx context.Context) error
	Run(ctx context.Context) error
}

Delegate combines the actual experiment actions in a single interface.

type Scenario

type Scenario struct {
	// Delegate is responsible for performing the actual experiment actions.
	Delegate Delegate

	ScenarioName string

	Log     logr.Logger
	Manager manager.Manager
	client.Client

	RunID    string
	Labels   map[string]string
	OwnerRef *metav1.OwnerReference
	// contains filtered or unexported fields
}

Scenario provides a common base implemenation for parts of the experiment.Scenario interface.

func (*Scenario) AddToManager

func (s *Scenario) AddToManager(mgr manager.Manager) error

func (*Scenario) Done

func (s *Scenario) Done() <-chan struct{}

func (*Scenario) Name

func (s *Scenario) Name() string

func (*Scenario) Start

func (s *Scenario) Start(ctx context.Context) (err error)

func (*Scenario) Wait

func (s *Scenario) Wait(ctx context.Context, d time.Duration) error

Wait does blocks until the given duration has passed or returns an error when the context is canceled.

Jump to

Keyboard shortcuts

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