Documentation ¶
Index ¶
- Constants
- type Config
- type Ess
- func (e *Ess) AutoScale()
- func (e *Ess) CreateAutoFlow(clusterName string, vSwitchID string, ecsPassword string, sgID string) error
- func (e *Ess) CreateFlow(clusterName string, vSwitchID string, ecsPassword string, sgID string) error
- func (e *Ess) CreateNotificationConfiguration(queueName string) error
- func (e *Ess) CreateScaleConf(ecsPassword string, sgID string) error
- func (e *Ess) CreateScaleGroup(essGroupName string, vSwitchID string) error
- func (e *Ess) CreateScaleRule(essScaleSimpleRuleName string, num int) error
- func (e *Ess) CreateScheduledTask(name string, recurrenceType string, recurrenceValue string, launchTime string) error
- func (e *Ess) CreateSchedulerFlow(req apistructs.SchedulerScaleReq) error
- func (e *Ess) DeleteScaleRule(name string) error
- func (e *Ess) DeleteScheduledTasks(name string) error
- func (e *Ess) DetectResource(ctx context.Context)
- func (e *Ess) EnableScalingGroup() error
- func (e *Ess) EnsureScaleGroupExist(essGroupName string) (bool, error)
- func (e *Ess) EnsureScaleRuleExist(name string) (bool, error)
- func (e *Ess) EnsureScheduledTasks(name string) (bool, error)
- func (e *Ess) ExecScaleRule(scaleRuleName string) error
- func (e *Ess) Init(req apistructs.BasicCloudConf, m *mns.Mns, n *nodes.Nodes) (*Ess, error)
- func (e *Ess) UpdateScheduledTasks(id string, recurrenceType string, recurrenceValue string, launchTime string) error
Constants ¶
const ( EssGroupNameSuff = "-dice-ess" EssScaleSimpleRuleSuff = "-dice-auto-rule" EssScaleSchedulerRuleSuff = "-dice-scheduler-rule" EssScaleSchedulerTaskSuff = "-dice-scheduler-task" TimeLayout = "2006-01-02T15:04Z" DetectInterval = 30 MaxLimit = 80 MinLimit = 70 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ess ¶
type Ess struct { Config *Config ClusterSvc clusterpb.ClusterServiceServer // contains filtered or unexported fields }
func (*Ess) CreateAutoFlow ¶
func (e *Ess) CreateAutoFlow(clusterName string, vSwitchID string, ecsPassword string, sgID string) error
CreateAutoFlow Create ess with auto mode
func (*Ess) CreateFlow ¶
func (e *Ess) CreateFlow(clusterName string, vSwitchID string, ecsPassword string, sgID string) error
CreateFlow Create elastic scale group, elastic scale configuration, elastic scale rule in order when start autoscale
func (*Ess) CreateNotificationConfiguration ¶
CreateNotificationConfiguration Related configuration
func (*Ess) CreateScaleConf ¶
CreateScaleConf
func (*Ess) CreateScaleGroup ¶
CreateScaleGroup Create scale group
func (*Ess) CreateScaleRule ¶
CreateScaleRule Create simple scale rule
func (*Ess) CreateScheduledTask ¶
func (e *Ess) CreateScheduledTask(name string, recurrenceType string, recurrenceValue string, launchTime string) error
CreateScheduledTask Create schedule task
func (*Ess) CreateSchedulerFlow ¶
func (e *Ess) CreateSchedulerFlow(req apistructs.SchedulerScaleReq) error
CreateSchedulerFlow Create ess with schedule mode
func (*Ess) DeleteScaleRule ¶
DeleteScaleRule Delete elastic scale rule
func (*Ess) DeleteScheduledTasks ¶
DeleteScaleRule Delete scale rule
func (*Ess) DetectResource ¶
DetectResource Detect cluster resource
func (*Ess) EnableScalingGroup ¶
EnableScalingGroup Enable scale group
func (*Ess) EnsureScaleGroupExist ¶
EnsureScaleGroupExist Ensure elastic scale group whether exists
func (*Ess) EnsureScaleRuleExist ¶
EnsureScaleRuleExist Ensure elastic scale rule whether exists
func (*Ess) EnsureScheduledTasks ¶
EnsureScheduledTasks Ensure schedule task whether exists
func (*Ess) ExecScaleRule ¶
ExecScaleRule Execute scale rule