Documentation ¶
Index ¶
Constants ¶
View Source
const (
AppName = "spore"
)
Variables ¶
View Source
var ( ListenAddr string AppConfPath string IsProMode bool LogLevel log.Level LogFile string AliyunAppKey string AliyunAppSecrety string AliyunRegionId string AliyunZoneId string AliyunSecurityGroupId string UsedInstanceTag map[string]string RefreshMinInterval time.Duration RefreshMaxInterval time.Duration )
Functions ¶
func AliyunClient ¶
func NewPagination ¶
func NewPagination() common.Pagination
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func NewCluster ¶
func (*Cluster) GetInstance ¶
get a instance from running instance based on image
func (*Cluster) RefreshInstances ¶
get all instances, instance is processed differently based on status, instance have four status: Starting, Running, Stoping, Stopped, refer: https://help.aliyun.com/document_detail/ecs/open-api/appendix/instancestatustable.html Running: instance with status running may being used or may be available Sopped: instance with status soppend shoult to be started, into starting status
func (*Cluster) StopInstance ¶
stop a instance with running status
type Instance ¶
type Instance struct { Attrs ecs.InstanceAttributesType Disk ecs.DiskItemType // contains filtered or unexported fields }
type InstanceList ¶
func NewInstanceList ¶
func NewInstanceList() *InstanceList
func (*InstanceList) Find ¶
func (l *InstanceList) Find(imageId string) *Instance
func (*InstanceList) Init ¶
func (l *InstanceList) Init() *InstanceList
func (*InstanceList) Len ¶
func (l *InstanceList) Len() int
func (*InstanceList) Push ¶
func (l *InstanceList) Push(e *Instance) *Instance
func (*InstanceList) Remove ¶
func (l *InstanceList) Remove(e *Instance) *Instance
Click to show internal directories.
Click to hide internal directories.