Documentation ¶
Index ¶
- Constants
- Variables
- type AddTagsArgs
- type Aliyun
- func (p *Aliyun) AddTags(args *AddTagsArgs) error
- func (p *Aliyun) AttachDisk(instanceId string, diskId string) error
- func (p *Aliyun) DetachDisk(instanceId string, diskId string) error
- func (p *Aliyun) GetDiskById(diskId string) (*Disk, error)
- func (p *Aliyun) GetDiskByTags(tags map[string]string) (*Disk, error)
- func (p *Aliyun) GetInstanceByHostname(hostname string) (*Instance, error)
- func (p *Aliyun) WaitForDisk(diskId string, status DiskStatus, timeout time.Duration) error
- type Disk
- type DiskStatus
- type Instance
- type Provider
- type TagResourceType
Constants ¶
View Source
const ( DevicePrefixLocal = "/dev/vd" DevicePrefixAPI = "/dev/xvd" )
View Source
const ( DiskStatusInUse = DiskStatus("In_use") DiskStatusAvailable = DiskStatus("Available") DiskStatusAttaching = DiskStatus("Attaching") DiskStatusDetaching = DiskStatus("Detaching") DiskStatusCreating = DiskStatus("Creating") DiskStatusReIniting = DiskStatus("ReIniting") )
View Source
const ( TagResourceImage = TagResourceType("image") TagResourceInstance = TagResourceType("instance") TagResourceSnapshot = TagResourceType("snapshot") TagResourceDisk = TagResourceType("disk") )
View Source
const DefaultInterval = time.Second
View Source
const DefaultTimeout = time.Minute
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AddTagsArgs ¶ added in v1.2.0
type AddTagsArgs struct { ResourceId string ResourceType TagResourceType Tag map[string]string }
type Aliyun ¶
type Aliyun struct {
// contains filtered or unexported fields
}
func (*Aliyun) AddTags ¶ added in v1.2.0
func (p *Aliyun) AddTags(args *AddTagsArgs) error
func (*Aliyun) GetDiskByTags ¶ added in v1.2.0
func (*Aliyun) GetInstanceByHostname ¶
func (*Aliyun) WaitForDisk ¶
type Disk ¶
type Disk ecs.DiskItemType
func (*Disk) IsAvailable ¶
func (*Disk) IsDetaching ¶
func (*Disk) LocalDevice ¶
func (*Disk) SetLocalDevice ¶
type Provider ¶
type Provider interface { GetInstanceByHostname(hostname string) (*Instance, error) GetDiskById(diskId string) (*Disk, error) GetDiskByTags(tags map[string]string) (*Disk, error) AttachDisk(instanceId string, diskId string) error DetachDisk(isntanceId string, diskId string) error WaitForDisk(diskId string, status DiskStatus, timeout time.Duration) error AddTags(args *AddTagsArgs) error }
type TagResourceType ¶ added in v1.2.0
type TagResourceType string
Click to show internal directories.
Click to hide internal directories.