Documentation ¶
Index ¶
- func GetNotificationChannel(currentSession *session.Session) *chan string
- func PickAutoscalingGroup(currentSession *session.Session, requiredTags *map[string]string) (*autoscaling.Group, error)
- func PickInstance(currentSession *session.Session, autoscalingGroup *autoscaling.Group, ...) (*ec2.Instance, error)
- func PickStoppedInstances(currentSession *session.Session, requiredTags *map[string]string) ([]*ec2.Instance, error)
- func PokeWithAStick(currentSession *session.Session, config *StateControlConfiguration) error
- func RestoreInstances(currentSession *session.Session, config *StateControlConfiguration) error
- func StartInstances(currentSession *session.Session, instances []*ec2.Instance, tagKey *string) error
- func StopInstance(currentSession *session.Session, instance *ec2.Instance, tagKey *string) error
- func TerminateInstance(currentSession *session.Session, instance *ec2.Instance, tagKey *string) error
- func ThrowBanana(currentSession *session.Session, config *StateControlConfiguration) error
- type Configuration
- type StateControlConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNotificationChannel ¶
GetNotificationChannel - returns notification channel to publish messages to Cloudwatch
func PickAutoscalingGroup ¶
func PickAutoscalingGroup(currentSession *session.Session, requiredTags *map[string]string) (*autoscaling.Group, error)
PickAutoscalingGroup - picks eligible autoscaling group
func PickInstance ¶
func PickInstance(currentSession *session.Session, autoscalingGroup *autoscaling.Group, requiredTags *map[string]string) (*ec2.Instance, error)
PickInstance - picks eligible instance
func PickStoppedInstances ¶
func PokeWithAStick ¶
func PokeWithAStick(currentSession *session.Session, config *StateControlConfiguration) error
PokeWithAStick - stops an eligible instance
func RestoreInstances ¶
func RestoreInstances(currentSession *session.Session, config *StateControlConfiguration) error
RestoreInstances - starts previously stopped instances
func StartInstances ¶
func StopInstance ¶
StopInstance - tags instance and stops it
func TerminateInstance ¶
func TerminateInstance(currentSession *session.Session, instance *ec2.Instance, tagKey *string) error
TerminateInstance - tags instance and terminates it
func ThrowBanana ¶
func ThrowBanana(currentSession *session.Session, config *StateControlConfiguration) error
ThrowBanana - throws a banana to terminate eligible instance in Autoscaling group
Types ¶
type Configuration ¶
type Configuration struct { Terminate *StateControlConfiguration Stop *StateControlConfiguration Restore *StateControlConfiguration }
Configuration - describes configuration file
func ReadConfigiguration ¶
func ReadConfigiguration(filename string) Configuration
ReadConfigiguration - gets configuration file from the specified location and applies the default values if needed
Click to show internal directories.
Click to hide internal directories.