Documentation
¶
Index ¶
Constants ¶
View Source
const (
// ScheduledEventKind is a const to define a scheduled event kind of interruption event
ScheduledEventKind = "SCHEDULED_EVENT"
)
View Source
const (
// SpotITNKind is a const to define a Spot ITN kind of interruption event
SpotITNKind = "SPOT_ITN"
)
Variables ¶
This section is empty.
Functions ¶
func MonitorForScheduledEvents ¶
func MonitorForScheduledEvents(interruptionChan chan<- InterruptionEvent, cancelChan chan<- InterruptionEvent, imds *ec2metadata.Service) error
MonitorForScheduledEvents continuously monitors metadata for scheduled events and sends interruption events to the passed in channel
func MonitorForSpotITNEvents ¶
func MonitorForSpotITNEvents(interruptionChan chan<- InterruptionEvent, cancelChan chan<- InterruptionEvent, imds *ec2metadata.Service) error
MonitorForSpotITNEvents continuously monitors metadata for spot ITNs and sends interruption events to the passed in channel
Types ¶
type InterruptionEvent ¶
type InterruptionEvent struct {
EventID string
Kind string
Description string
State string
StartTime time.Time
EndTime time.Time
Drained bool
PreDrainTask preDrainTask `json:"-"`
}
InterruptionEvent gives more context of the interruption event
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.