Documentation
¶
Index ¶
Constants ¶
const (
// 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 EC2StateChangeDetail ¶
type EC2StateChangeDetail struct {
InstanceID string `json:"instance-id"`
State string `json:"state"`
}
EC2StateChangeDetail holds the event details for EC2 state change events from Amazon EventBridge
type EventBridgeEvent ¶
type EventBridgeEvent struct {
Version string `json:"version"`
ID string `json:"id"`
DetailType string `json:"detail-type"`
Source string `json:"source"`
Account string `json:"account"`
Time string `json:"time"`
Region string `json:"region"`
Resources []string `json:"resources"`
Detail json.RawMessage `json:"detail"`
}
EventBridgeEvent is a structure to hold generic event details from Amazon EventBridge
type LifecycleDetail ¶
type LifecycleDetail struct {
LifecycleActionToken string `json:"LifecycleActionToken"`
AutoScalingGroupName string `json:"AutoScalingGroupName"`
LifecycleHookName string `json:"LifecycleHookName"`
EC2InstanceID string `json:"EC2InstanceId"`
LifecycleTransition string `json:"LifecycleTransition"`
}
LifecycleDetail provides the ASG lifecycle event details
type RebalanceRecommendationDetail ¶ added in v1.10.0
type RebalanceRecommendationDetail struct {
InstanceID string `json:"instance-id"`
}
RebalanceRecommendationDetail holds the event details for rebalance recommendation events from Amazon EventBridge
type SQSMonitor ¶
type SQSMonitor struct {
InterruptionChan chan<- monitor.InterruptionEvent
CancelChan chan<- monitor.InterruptionEvent
QueueURL string
SQS sqsiface.SQSAPI
ASG autoscalingiface.AutoScalingAPI
EC2 ec2iface.EC2API
CheckIfManaged bool
ManagedAsgTag string
}
SQSMonitor is a struct definition that knows how to process events from Amazon EventBridge
func (SQSMonitor) Kind ¶
func (m SQSMonitor) Kind() string
Kind denotes the kind of event that is processed
func (SQSMonitor) Monitor ¶
func (m SQSMonitor) Monitor() error
Monitor continuously monitors SQS for events and sends interruption events to the passed in channel
type SpotInterruptionDetail ¶
type SpotInterruptionDetail struct {
InstanceID string `json:"instance-id"`
InstanceAction string `json:"instance-action"`
}
SpotInterruptionDetail holds the event details for spot interruption events from Amazon EventBridge