ess

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
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 Config

type Config struct {
	Region       string
	AccessKeyID  string
	AccessSecret string

	EssGroupID      string
	ScaleConfID     string
	EssScaleRule    string
	ScheduledTaskId string
	ScalingRuleId   string
	IsExist         bool
	ScalePipeLineID uint64
	// contains filtered or unexported fields
}

type Ess

type Ess struct {
	Config *Config
	// contains filtered or unexported fields
}

func New

func New(bdl *bundle.Bundle, mns *mns.Mns, nodes *nodes.Nodes, labels *labels.Labels) *Ess

func (*Ess) AutoScale

func (e *Ess) AutoScale()

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

func (e *Ess) CreateNotificationConfiguration(queueName string) error

CreateNotificationConfiguration Related configuration

func (*Ess) CreateScaleConf

func (e *Ess) CreateScaleConf(ecsPassword string, sgID string) error

CreateScaleConf

func (*Ess) CreateScaleGroup

func (e *Ess) CreateScaleGroup(essGroupName string, vSwitchID string) error

CreateScaleGroup Create scale group

func (*Ess) CreateScaleRule

func (e *Ess) CreateScaleRule(essScaleSimpleRuleName string, num int) error

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

func (e *Ess) DeleteScaleRule(name string) error

DeleteScaleRule Delete elastic scale rule

func (*Ess) DeleteScheduledTasks

func (e *Ess) DeleteScheduledTasks(name string) error

DeleteScaleRule Delete scale rule

func (*Ess) DetectResource

func (e *Ess) DetectResource(ctx context.Context)

DetectResource Detect cluster resource

func (*Ess) EnableScalingGroup

func (e *Ess) EnableScalingGroup() error

EnableScalingGroup Enable scale group

func (*Ess) EnsureScaleGroupExist

func (e *Ess) EnsureScaleGroupExist(essGroupName string) (bool, error)

EnsureScaleGroupExist Ensure elastic scale group whether exists

func (*Ess) EnsureScaleRuleExist

func (e *Ess) EnsureScaleRuleExist(name string) (bool, error)

EnsureScaleRuleExist Ensure elastic scale rule whether exists

func (*Ess) EnsureScheduledTasks

func (e *Ess) EnsureScheduledTasks(name string) (bool, error)

EnsureScheduledTasks Ensure schedule task whether exists

func (*Ess) ExecScaleRule

func (e *Ess) ExecScaleRule(scaleRuleName string) error

ExecScaleRule Execute scale rule

func (*Ess) Init

func (e *Ess) Init(req apistructs.BasicCloudConf, m *mns.Mns, n *nodes.Nodes) (*Ess, error)

Init Init auto scale

func (*Ess) UpdateScheduledTasks

func (e *Ess) UpdateScheduledTasks(id string, recurrenceType string, recurrenceValue string, launchTime string) error

UpdateScheduledTasks Update schedule task

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL