Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SpotITNKind is a const to define a Spot ITN kind of interruption event SpotITNKind = "SPOT_ITN" // ScheduledEventKind is a const to define a scheduled event kind of interruption event ScheduledEventKind = "SCHEDULED_EVENT" // RebalanceRecommendationKind is a const to define a Rebalance Recommendation kind of interruption event RebalanceRecommendationKind = "REBALANCE_RECOMMENDATION" // StateChangeKind is a const to define an EC2 State Change kind of interruption event StateChangeKind = "STATE_CHANGE" // ASGLifecycleKind is a const to define an ASG Lifecycle kind of interruption event ASGLifecycleKind = "ASG_LIFECYCLE" // ASGLifecycleKind is a const to define an ASG Launch Lifecycle kind of interruption event ASGLaunchLifecycleKind = "ASG_LAUNCH_LIFECYCLE" // SQSTerminateKind is a const to define an SQS termination kind of interruption event SQSTerminateKind = "SQS_TERMINATE" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DrainTask ¶
type DrainTask func(InterruptionEvent, node.Node) error
DrainTask defines a task to be run when draining a node
type InterruptionEvent ¶
type InterruptionEvent struct { EventID string Kind string Monitor string Description string State string AutoScalingGroupName string NodeName string NodeLabels map[string]string Pods []string InstanceID string ProviderID string IsManaged bool StartTime time.Time EndTime time.Time NodeProcessed bool InProgress bool PreDrainTask DrainTask `json:"-"` PostDrainTask DrainTask `json:"-"` }
InterruptionEvent gives more context of the interruption event
func (*InterruptionEvent) IsRebalanceRecommendation ¶ added in v1.10.0
func (e *InterruptionEvent) IsRebalanceRecommendation() bool
IsRebalanceRecommendation returns true if the interruption event is a rebalance recommendation
func (*InterruptionEvent) TimeUntilEvent ¶
func (e *InterruptionEvent) TimeUntilEvent() time.Duration
TimeUntilEvent returns the duration until the event start time
Click to show internal directories.
Click to hide internal directories.