Documentation ¶
Index ¶
- Constants
- type Config
- type Mns
- func (m *Mns) BathReceiveMsg() (*ali_mns.BatchMessageReceiveResponse, error)
- func (m *Mns) Consume(clusterInfo *clusterpb.ClusterInfo)
- func (m *Mns) CreateQueue() error
- func (m *Mns) DeleteMsg(receiptHandle string, visibilityTimeout int64) error
- func (m *Mns) FetchValidClusterInfo() []*clusterpb.ClusterInfo
- func (m *Mns) GetAccountID(req apistructs.BasicCloudConf) (string, error)
- func (m *Mns) GetEssActivityMsgs() ([]apistructs.EssActivityMsg, error)
- func (m *Mns) GetInstancesIDByPrivateIp(req apistructs.EcsInfoReq) (string, error)
- func (m *Mns) GetInstancesInfo(req apistructs.EcsInfoReq) (*ecs.DescribeInstancesResponse, error)
- func (m *Mns) GetInstancesPrivateIp(req apistructs.EcsInfoReq) (map[string]string, error)
- func (m *Mns) GetScaleOutInfo() (*apistructs.ScaleInfo, error)
- func (m *Mns) InitConfig(req apistructs.MnsReq) error
- func (m *Mns) IsClusterLocked(clusterName string) (bool, error)
- func (m *Mns) LockCluster(clusterName string) error
- func (m *Mns) PeriodicallyFetchClusters() chan *clusterpb.ClusterInfo
- func (m *Mns) PreProcess(info *clusterpb.ClusterInfo) error
- func (m *Mns) Process(ctx context.Context)
- func (m *Mns) ReceiveMsg() (*ali_mns.MessageReceiveResponse, error)
- func (m *Mns) Run()
- func (m *Mns) UnlockCluster(clusterName string) error
- type ScalingType
Constants ¶
View Source
const ( AsgMnsQueuePrefix = "asg-mns" AutoScaleLabel = "autoscale" ScalingOutSuccess ScalingType = "AUTOSCALING:SCALE_OUT_SUCCESS" ScalingInSuccess ScalingType = "AUTOSCALING:SCALE_IN_SUCCESS" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mns ¶
type Mns struct { Config *Config ClusterSvc clusterpb.ClusterServiceServer // contains filtered or unexported fields }
func (*Mns) BathReceiveMsg ¶
func (m *Mns) BathReceiveMsg() (*ali_mns.BatchMessageReceiveResponse, error)
func (*Mns) Consume ¶
func (m *Mns) Consume(clusterInfo *clusterpb.ClusterInfo)
func (*Mns) CreateQueue ¶
func (*Mns) FetchValidClusterInfo ¶
func (m *Mns) FetchValidClusterInfo() []*clusterpb.ClusterInfo
func (*Mns) GetAccountID ¶
func (m *Mns) GetAccountID(req apistructs.BasicCloudConf) (string, error)
func (*Mns) GetEssActivityMsgs ¶
func (m *Mns) GetEssActivityMsgs() ([]apistructs.EssActivityMsg, error)
func (*Mns) GetInstancesIDByPrivateIp ¶
func (m *Mns) GetInstancesIDByPrivateIp(req apistructs.EcsInfoReq) (string, error)
func (*Mns) GetInstancesInfo ¶
func (m *Mns) GetInstancesInfo(req apistructs.EcsInfoReq) (*ecs.DescribeInstancesResponse, error)
func (*Mns) GetInstancesPrivateIp ¶
func (m *Mns) GetInstancesPrivateIp(req apistructs.EcsInfoReq) (map[string]string, error)
func (*Mns) GetScaleOutInfo ¶
func (m *Mns) GetScaleOutInfo() (*apistructs.ScaleInfo, error)
get scale out instance info: map[instanceId]instanceIp
func (*Mns) InitConfig ¶
func (m *Mns) InitConfig(req apistructs.MnsReq) error
func (*Mns) IsClusterLocked ¶
return true: cluster locked, else unlocked
func (*Mns) LockCluster ¶
func (*Mns) PeriodicallyFetchClusters ¶
func (m *Mns) PeriodicallyFetchClusters() chan *clusterpb.ClusterInfo
periodically fetch cluster info from db
func (*Mns) PreProcess ¶
func (m *Mns) PreProcess(info *clusterpb.ClusterInfo) error
check latest add nodes status, if failed, lock auto scale
func (*Mns) ReceiveMsg ¶
func (m *Mns) ReceiveMsg() (*ali_mns.MessageReceiveResponse, error)
func (*Mns) UnlockCluster ¶
type ScalingType ¶
type ScalingType string
func (ScalingType) Sting ¶
func (s ScalingType) Sting() string
Click to show internal directories.
Click to hide internal directories.