Documentation ¶
Index ¶
- type Service
- func (s *Service) CreateOrGetMachine(machine *actuators.MachineScope, bootstrapToken, kubeConfig string) (*v1alpha1.Instance, error)
- func (s *Service) DeleteBastion() error
- func (s *Service) DeleteNetwork() (err error)
- func (s *Service) GetConsoleOutput(instanceID string) (string, error)
- func (s *Service) InstanceByTags(machine *actuators.MachineScope) (*v1alpha1.Instance, error)
- func (s *Service) InstanceIfExists(id string) (*v1alpha1.Instance, error)
- func (s *Service) MachineExists(machine *actuators.MachineScope) (bool, error)
- func (s *Service) ReconcileBastion() error
- func (s *Service) ReconcileNetwork() (err error)
- func (s *Service) TerminateInstance(instanceID string) error
- func (s *Service) TerminateInstanceAndWait(instanceID string) error
- func (s *Service) UpdateInstanceSecurityGroups(instanceID string, ids []string) error
- func (s *Service) UpdateResourceTags(resourceID *string, create map[string]string, remove map[string]string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service holds a collection of interfaces. The interfaces are broken down like this to group functions together. One alternative is to have a large list of functions from the ec2 client.
func NewService ¶
NewService returns a new service given the ec2 api client.
func (*Service) CreateOrGetMachine ¶
func (s *Service) CreateOrGetMachine(machine *actuators.MachineScope, bootstrapToken, kubeConfig string) (*v1alpha1.Instance, error)
CreateOrGetMachine will either return an existing instance or create and return an instance.
func (*Service) DeleteBastion ¶
DeleteBastion deletes the Bastion instance
func (*Service) DeleteNetwork ¶
DeleteNetwork deletes the network of the given cluster.
func (*Service) GetConsoleOutput ¶
GetConsoleOutput returns the latest console output of an instance
func (*Service) InstanceByTags ¶
InstanceByTags returns the existing instance or nothing if it doesn't exist.
func (*Service) InstanceIfExists ¶
InstanceIfExists returns the existing instance or nothing if it doesn't exist.
func (*Service) MachineExists ¶
func (s *Service) MachineExists(machine *actuators.MachineScope) (bool, error)
MachineExists will return whether or not a machine exists.
func (*Service) ReconcileBastion ¶
ReconcileBastion ensures a bastion is created for the cluster
func (*Service) ReconcileNetwork ¶
ReconcileNetwork reconciles the network of the given cluster.
func (*Service) TerminateInstance ¶
TerminateInstance terminates an EC2 instance. Returns nil on success, error in all other cases.
func (*Service) TerminateInstanceAndWait ¶
TerminateInstanceAndWait terminates and waits for an EC2 instance to terminate.
func (*Service) UpdateInstanceSecurityGroups ¶
UpdateInstanceSecurityGroups modifies the security groups of the given EC2 instance.
func (*Service) UpdateResourceTags ¶
func (s *Service) UpdateResourceTags(resourceID *string, create map[string]string, remove map[string]string) error
UpdateResourceTags updates the tags for an instance. This will be called if there is anything to create (update) or delete. We may not always have to perform each action, so we check what we're receiving to avoid calling AWS if we don't need to.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_ec2iface is a generated GoMock package.
|
Package mock_ec2iface is a generated GoMock package. |