itn

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SpotITNAction = "aws:ec2:send-spot-instance-interruptions"
)

Variables

This section is empty.

Functions

func ARNToInstanceID

func ARNToInstanceID(arn string) string

Types

type Event

type Event struct {
	Message   string
	NextEvent time.Duration
	Timestamp time.Time
}

type ITN

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

func New

func New(cfg aws.Config) *ITN

func (ITN) Clean

func (i ITN) Clean(ctx context.Context, experiment types.Experiment) error

Clean deletes the generated experiment template from FIS

func (ITN) Interrupt

func (i ITN) Interrupt(ctx context.Context, instanceIDs []string, delay time.Duration, clean bool) (*types.Experiment, <-chan Event, error)

Interrupt will start an FIS experiment to send Spot ITNs to the instance IDs specified and then monitor the experiment for the progress.

func (ITN) SpotInstances

func (i ITN) SpotInstances(ctx context.Context) ([]ec2types.Instance, error)

Jump to

Keyboard shortcuts

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