Documentation ¶
Overview ¶
Package events defines an interface for receiving interruption events, along with cloud-provider specific implementations
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InterruptionEvent ¶
InterruptionEvent represents a generic event when an instance is interrupted, regardless of cloud provider
type NewPubSubNotifierInput ¶
type NewPubSubNotifierInput struct { Logger *zap.SugaredLogger ProjectID string SubscriptionName string }
NewPubSubNotifierInput defines all required fields to create a PubSubNotifier
type Notifier ¶
type Notifier interface {
Receive(ctx context.Context, event chan<- InterruptionEvent)
}
Notifier is responsible for sending InterruptionEvents to event channel whenever an instance is interrupted. There should generally be one Notifier implementation per cloud provider
func NewPubSubNotifier ¶
func NewPubSubNotifier(ctx context.Context, input *NewPubSubNotifierInput) (Notifier, error)
NewPubSubNotifier receives messages from the spot-instances-preemption-events subscription
Click to show internal directories.
Click to hide internal directories.