Documentation ¶
Index ¶
- Constants
- Variables
- func CopyMap(source *map[string]string) map[string]string
- func InitLogger(loglevel string)
- func StartEngine(cs *ConfigStorage)
- type Account
- type AutoAmi
- type AutoInstance
- func (self *AutoInstance) CreateAmi(name string) (*AutoAmi, error)
- func (self *AutoInstance) IsStopped() (bool, error)
- func (self *AutoInstance) TagInstance() error
- func (self *AutoInstance) Terminate() error
- func (self *AutoInstance) Update(instance *ec2.Instance)
- func (self *AutoInstance) WaitForStoppedState() error
- type AutoRefreshAmi
- type ByTimeReverse
- type ConfigStorage
- type EbsVolume
- type LaunchConfig
- type Project
- type Source
- type UserData
Constants ¶
View Source
const INSTANCE_MAX_AGE = time.Minute * 120
View Source
const RETRYCOUNT = 10
Variables ¶
View Source
var LOGLEVEL_MAPPING map[string]logrus.Level = map[string]logrus.Level{ "panic": logrus.PanicLevel, "fatal": logrus.FatalLevel, "error": logrus.ErrorLevel, "warn": logrus.WarnLevel, "info": logrus.InfoLevel, "debug": logrus.DebugLevel, }
Functions ¶
func InitLogger ¶
func InitLogger(loglevel string)
func StartEngine ¶
func StartEngine(cs *ConfigStorage)
Types ¶
type Account ¶
func (*Account) FindInstances ¶
func (self *Account) FindInstances(config *LaunchConfig) (*[]AutoInstance, error)
func (*Account) LaunchInstance ¶
func (self *Account) LaunchInstance(config *LaunchConfig) (*AutoInstance, error)
type AutoAmi ¶
type AutoAmi struct { Id string Region string Architecture string Name string State string Description string CreationDate string Tags map[string]string Connection *ec2.EC2 }
func (*AutoAmi) DeleteOldAmi ¶
func (*AutoAmi) IsAvailable ¶
func (*AutoAmi) WaitForAvailableState ¶
type AutoInstance ¶
type AutoInstance struct { Id string ImageId string LaunchTime time.Time State string Tags map[string]string Region string Connection *ec2.EC2 }
func (*AutoInstance) IsStopped ¶
func (self *AutoInstance) IsStopped() (bool, error)
func (*AutoInstance) TagInstance ¶
func (self *AutoInstance) TagInstance() error
func (*AutoInstance) Terminate ¶
func (self *AutoInstance) Terminate() error
func (*AutoInstance) Update ¶
func (self *AutoInstance) Update(instance *ec2.Instance)
func (*AutoInstance) WaitForStoppedState ¶
func (self *AutoInstance) WaitForStoppedState() error
type AutoRefreshAmi ¶
type AutoRefreshAmi struct { Account *Account LaunchConfig LaunchConfig RetentionCount uint Cron string Name string ConfigErrors int // contains filtered or unexported fields }
func (*AutoRefreshAmi) CleanUp ¶
func (self *AutoRefreshAmi) CleanUp()
func (*AutoRefreshAmi) Copy ¶
func (self *AutoRefreshAmi) Copy() AutoRefreshAmi
func (*AutoRefreshAmi) Refresh ¶
func (self *AutoRefreshAmi) Refresh()
func (*AutoRefreshAmi) Validate ¶
func (self *AutoRefreshAmi) Validate() error
type ByTimeReverse ¶
func (ByTimeReverse) Len ¶
func (a ByTimeReverse) Len() int
func (ByTimeReverse) Less ¶
func (a ByTimeReverse) Less(i, j int) bool
func (ByTimeReverse) Swap ¶
func (a ByTimeReverse) Swap(i, j int)
type ConfigStorage ¶
type ConfigStorage struct { GoWait sync.WaitGroup ConfigErrors int // contains filtered or unexported fields }
func (*ConfigStorage) ProcessDirectory ¶
func (self *ConfigStorage) ProcessDirectory(path string) error
type EbsVolume ¶
type LaunchConfig ¶
type LaunchConfig struct { UserData string Source Source InstanceType string Tags map[string]string Ebs []EbsVolume }
func (*LaunchConfig) Copy ¶
func (self *LaunchConfig) Copy() LaunchConfig
Source Files ¶
Click to show internal directories.
Click to hide internal directories.