terminator

package
v0.0.0-...-f507469 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "clutch.service.chaos.experimentation.termination"

Variables

View Source
var CriterionFactories = map[string]CriterionFactory{
	TypeUrl(&terminatorv1.MaxTimeTerminationCriterion{}): &maxTimeTerminationFactory{},
}

Functions

func New

func New(cfg *anypb.Any, logger *zap.Logger, scope tally.Scope) (service.Service, error)

func TypeUrl

func TypeUrl(message proto.Message) string

Types

type CriterionFactory

type CriterionFactory interface {
	Create(cfg *anypb.Any) (TerminationCriterion, error)
}

type Monitor

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

func NewMonitor

func NewMonitor(cfg *anypb.Any, logger *zap.Logger, scope tally.Scope) (*Monitor, error)

func (*Monitor) Run

func (m *Monitor) Run(ctx context.Context)

type TerminationCriterion

type TerminationCriterion interface {
	// ShouldTerminate determines whether the provided experiment should be terminated.
	// To signal that termination should occur, return a non-empty string with a nil error.
	ShouldTerminate(experiment *experimentstore.Experiment) (string, error)
}

Jump to

Keyboard shortcuts

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