Documentation
¶
Index ¶
- type AWSExecutor
- func (e *AWSExecutor) Connect() error
- func (e AWSExecutor) GetAccountName() string
- func (e *AWSExecutor) PowerOffCluster(instanceIDs []string) error
- func (e *AWSExecutor) PowerOnCluster(instanceIDs []string) error
- func (e *AWSExecutor) ProcessAction(action actions.Action) error
- func (e *AWSExecutor) SetRegion(region string) error
- type CloudExecutor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSExecutor ¶
type AWSExecutor struct {
// contains filtered or unexported fields
}
AWSExecutor implements the CloudExecutor interface for AWS
func NewAWSExecutor ¶
func NewAWSExecutor(account *inventory.Account, ch <-chan actions.Action, logger *zap.Logger) *AWSExecutor
NewAWSExecutor creates a new AWSExecutor for a specific inventory Account, configures the AWSConnection, and establishes the connection with AWS to validate that the connection is correct.
func (*AWSExecutor) Connect ¶
func (e *AWSExecutor) Connect() error
Connect establishes the connection with AWS.
func (AWSExecutor) GetAccountName ¶
func (e AWSExecutor) GetAccountName() string
GetAccountName returns the account name
func (*AWSExecutor) PowerOffCluster ¶
func (e *AWSExecutor) PowerOffCluster(instanceIDs []string) error
PowerOffCluster attempts to stop the EC2 instances specified by instanceIDs. It delegates the actual start operation, including state filtering, to the underlying AWSEC2Connection.
func (*AWSExecutor) PowerOnCluster ¶
func (e *AWSExecutor) PowerOnCluster(instanceIDs []string) error
PowerOnCluster attempts to start the EC2 instances specified by instanceIDs. It delegates the actual start operation, including state filtering, to the underlying AWSEC2Connection.
func (*AWSExecutor) ProcessAction ¶
func (e *AWSExecutor) ProcessAction(action actions.Action) error
ProcessAction gets an action, and starts the procude for the defined ActionOperation
func (*AWSExecutor) SetRegion ¶
func (e *AWSExecutor) SetRegion(region string) error
SetRegion configures a new region for the AWSConnection and refreshes the AWSServiceClients with the new region
type CloudExecutor ¶
type CloudExecutor interface {
// Connect logs in into the cloud provider
Connect() error
// ProcessAction receives and action and process it depending on its type
ProcessAction(action actions.Action) error
// GetAccountName returns accounts name
GetAccountName() string
// SetRegion configure the cloud provider client for using a specific region
SetRegion(string) error
}
CloudExecutor interface defines the foundations for Executors. Executors are the implementation for connecting and sending orders to a specific cloud provider