orchestrator

package
v0.0.0-...-12a582f Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrOrchestratorDoesNotExist is returned is an orchestrator is loaded
	// by name but not recognized or implemented
	ErrOrchestratorDoesNotExist = errors.New("named orchestrator doesn't exist")
)

Functions

This section is empty.

Types

type Adaptive

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

TODO: NOT IMPLEMENTED Adaptive s a standard Adaptive test ie: a/b, a/b w/ control, a/b/c

func NewAdaptiveExperiment

func NewAdaptiveExperiment(p *plan.Definition) *Adaptive

NewAdaptiveExperiment returns an initialized Adaptive struct with proper values configure

func (*Adaptive) Abort

func (a *Adaptive) Abort() error

Abort will stop the experiment abruptly

func (*Adaptive) Bootstrap

func (a *Adaptive) Bootstrap() error

Bootstrap begins setting up the experiment

func (*Adaptive) Finished

func (a *Adaptive) Finished() chan bool

Finished will signal an event and close the channel when the experiment is finished

func (*Adaptive) Run

func (a *Adaptive) Run(ctx context.Context)

Run runs the entire process

func (*Adaptive) Start

func (a *Adaptive) Start(ctx context.Context) error

Start begins setting up the experiment

func (*Adaptive) Teardown

func (a *Adaptive) Teardown() error

Teardown will safely stop and de-provision the experiment abruptly

func (*Adaptive) Watch

func (a *Adaptive) Watch() chan Status

Watch will allow you to await status updates of any orchestrated experiment

type Bandit

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

TODO: NOT IMPLEMENTED Bandit s a standard Bandit test ie: a/b, a/b w/ control, a/b/c

func NewBanditExperiment

func NewBanditExperiment(p *plan.Definition) *Bandit

NewBanditExperiment returns an initialized Bandit struct with proper values configure

func (*Bandit) Abort

func (b *Bandit) Abort() error

Abort will stop the experiment abruptly

func (*Bandit) Bootstrap

func (b *Bandit) Bootstrap() error

Bootstrap begins setting up the experiment

func (*Bandit) Finished

func (b *Bandit) Finished() chan bool

Finished will signal an event and close the channel when the experiment is finished

func (*Bandit) Run

func (b *Bandit) Run(ctx context.Context)

Run runs the entire process

func (*Bandit) Start

func (b *Bandit) Start(ctx context.Context) error

Start begins the experiment

func (*Bandit) Teardown

func (b *Bandit) Teardown() error

Teardown will safely stop and de-provision the experiment abruptly

func (*Bandit) Watch

func (b *Bandit) Watch() chan Status

Watch will allow you to await status updates of any orchestrated experiment

type Orchestrator

type Orchestrator interface {
	Run(context.Context)
	Bootstrap() error
	Start(context.Context) error
	Abort() error
	Teardown() error

	Watch() chan Status
	Finished() chan bool
}

Orchestrator is the interface which all implemented experiment orchestrators must conform to in order to be valid

func Load

func Load(kind string, p *plan.Definition) (Orchestrator, error)

Load will load an orchestrator by name

type Running

type Running struct {
	Guards []*guard.Guard
	Probes []*probe.Probe
}

Running is a tracker for running elements of the experiment engine

type Split

type Split struct {
	Running Running
	// contains filtered or unexported fields
}

Split is a standard split test ie: a/b, a/b w/ control, a/b/c

func NewSplitExperiment

func NewSplitExperiment(p *plan.Definition) *Split

NewSplitExperiment returns an initialized Split struct with proper values configured

func (*Split) Abort

func (s *Split) Abort() error

Abort will stop the experiment abruptly

func (*Split) Bootstrap

func (s *Split) Bootstrap() error

Bootstrap begins setting up the experiment

func (*Split) Finished

func (s *Split) Finished() chan bool

Finished will signal an event and close the channel when the experiment is finished

func (*Split) Run

func (s *Split) Run(ctx context.Context)

Run will begin orchestration of the experiment

func (*Split) Start

func (s *Split) Start(ctx context.Context) error

Start begins the experiment

func (*Split) Teardown

func (s *Split) Teardown() error

Teardown will safely stop and de-provision the experiment abruptly

func (*Split) Watch

func (s *Split) Watch() chan Status

Watch will allow you to await status updates of any orchestrated experiment

type Status

type Status int

Status is the state of the experiment in the experiment lifecycle as observed by the orchestrator

const (
	// Starting signals that the experiment is starting
	Starting Status = iota

	// Ready signals the experiment is ready to begin
	Ready

	// Waiting signals the experiment is ready, and waiting to begin
	Waiting

	// Active signals the experiment is running
	Active

	// Aborted signals the experiment has been abruptly aborted
	Aborted

	// Stopped signals the experiment has been prematurely stopped
	Stopped

	// Finishing signals the experiment is in a state of being torn down
	Finishing

	// Finished signals the experiment has finished
	Finished
)

Jump to

Keyboard shortcuts

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