interruption

package
v0.0.0-...-5affba4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Action

type Action string
const (
	CordonAndDrain Action = "CordonAndDrain"
	NoAction       Action = "NoAction"
)

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller is an AWS interruption controller. It continually polls an SQS queue for events from aws.ec2 and aws.health that trigger node health events or node spot interruption/rebalance events.

func NewController

func NewController(kubeClient client.Client, clk clock.Clock, recorder events.Recorder,
	sqsProvider *SQSProvider, unavailableOfferingsCache *cache.UnavailableOfferings) *Controller

func (*Controller) Builder

func (*Controller) Name

func (c *Controller) Name() string

func (*Controller) Reconcile

func (c *Controller) Reconcile(ctx context.Context, _ reconcile.Request) (reconcile.Result, error)

type EventParser

type EventParser struct {
	// contains filtered or unexported fields
}

func NewEventParser

func NewEventParser(parsers ...messages.Parser) *EventParser

func (EventParser) Parse

func (p EventParser) Parse(msg string) (messages.Message, error)

type SQSProvider

type SQSProvider struct {
	// contains filtered or unexported fields
}

func NewSQSProvider

func NewSQSProvider(client sqsiface.SQSAPI) *SQSProvider

func (*SQSProvider) DeleteSQSMessage

func (s *SQSProvider) DeleteSQSMessage(ctx context.Context, msg *sqs.Message) error

func (*SQSProvider) DiscoverQueueURL

func (s *SQSProvider) DiscoverQueueURL(ctx context.Context) (string, error)

func (*SQSProvider) GetSQSMessages

func (s *SQSProvider) GetSQSMessages(ctx context.Context) ([]*sqs.Message, error)

func (*SQSProvider) QueueExists

func (s *SQSProvider) QueueExists(ctx context.Context) (bool, error)

func (*SQSProvider) Reset

func (s *SQSProvider) Reset()

func (*SQSProvider) SendMessage

func (s *SQSProvider) SendMessage(ctx context.Context, body interface{}) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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