instancestate

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package instancestate provides a way to interact with the EC2 instance state.

Index

Constants

View Source
const Ec2StateChangeNotification = "EC2 Instance State-change Notification"

Ec2StateChangeNotification defines the EC2 instance's state change notification.

Variables

This section is empty.

Functions

func GenerateQueueName

func GenerateQueueName(clusterName string) string

GenerateQueueName will generate a queue name.

Types

type Service

type Service struct {
	EventBridgeClient eventbridgeiface.EventBridgeAPI
	SQSClient         sqsiface.SQSAPI
	// contains filtered or unexported fields
}

Service defines the specs for a service.

func NewService

func NewService(clusterScope scope.EC2Scope) *Service

NewService returns a new service given the ec2 api client.

func (Service) AddInstanceToEventPattern

func (s Service) AddInstanceToEventPattern(instanceID string) error

AddInstanceToEventPattern will add an instance to an event pattern.

func (Service) DeleteEC2Events

func (s Service) DeleteEC2Events() error

DeleteEC2Events will delete a Service's EC2 events.

func (Service) ReconcileEC2Events

func (s Service) ReconcileEC2Events() error

ReconcileEC2Events will reconcile a Service's EC2 events.

func (Service) RemoveInstanceFromEventPattern

func (s Service) RemoveInstanceFromEventPattern(instanceID string)

RemoveInstanceFromEventPattern attempts a best effort update to the event rule to remove the instance. Any errors encountered won't be blocking.

Directories

Path Synopsis
Package mock_eventbridgeiface provides a mock implementation for the EventBridgeAPI interface.
Package mock_eventbridgeiface provides a mock implementation for the EventBridgeAPI interface.
Package mock_sqsiface provides a mock implementation for the SQSAPI interface.
Package mock_sqsiface provides a mock implementation for the SQSAPI interface.

Jump to

Keyboard shortcuts

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