lifecycle

package
v0.0.0-...-a9f80de Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ASGScaleInEvent            = "EC2 Instance-terminate Lifecycle Action"
	ASGSource                  = "aws.autoscaling"
	ASGTransition              = "autoscaling:EC2_INSTANCE_TERMINATING"
	EC2SpotInterruptionWarning = "EC2 Spot Instance Interruption Warning"
	EC2SpotActionStop          = "stop"
	EC2SpotActionTerminate     = "terminate"
	EC2SpotActionHibernate     = "hibernate"
)

Variables

View Source
var (
	ASGActionContinue = aws.String("CONTINUE")
)

Functions

This section is empty.

Types

type ASGLifecycleEventDetail

type ASGLifecycleEventDetail struct {
	LifecycleActionToken string
	AutoScalingGroupName string
	LifecycleHookName    string
	EC2InstanceId        string
	LifecycleTransition  string
}

type EC2SpotInterruptionEventDetail

type EC2SpotInterruptionEventDetail struct {
	InstanceID     string `json:"instance-id"`
	InstanceAction string `json:"instance-action,omitempty"`
}

type Handler

type Handler struct {
	AWSClient        awsclient.Client
	KubernetesClient k8sclient.Client
	k8sdrainer.Drainer
	HeartbeatInterval time.Duration
}

func (*Handler) HandleEvent

func (h *Handler) HandleEvent(ctx context.Context, event *events.CloudWatchEvent) error

HandleCloudwatchEvent routes

func (*Handler) ScaleIn

func (h *Handler) ScaleIn(ctx context.Context, asgEvent ASGLifecycleEventDetail) error

Jump to

Keyboard shortcuts

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