Documentation ¶
Overview ¶
* Copyright (C) 2017-2019 Alibaba Group Holding Limited
* Copyright (C) 2017-2019 Alibaba Group Holding Limited
* Copyright (C) 2017-2019 Alibaba Group Holding Limited
* Copyright (C) 2017-2019 Alibaba Group Holding Limited
* Copyright (C) 2017-2019 Alibaba Group Holding Limited
* Copyright (C) 2017-2019 Alibaba Group Holding Limited
* Copyright (C) 2017-2019 Alibaba Group Holding Limited
* Copyright (C) 2017-2019 Alibaba Group Holding Limited
* Copyright (C) 2017-2019 Alibaba Group Holding Limited
* Copyright (C) 2017-2019 Alibaba Group Holding Limited
Index ¶
- Constants
- Variables
- func AmendDiskPath(path string, category DiskCategory) string
- func DescribeDisks(client *ecs.Client, diskId string) (disk *ecs.Disk, err error)
- func GetNotFoundErrorFromString(str string) error
- func GetNotFoundMessage(product, id string) string
- func GetTimeErrorFromString(str string) error
- func GetTimeoutMessage(product, status string) string
- func IsExceptedErrors(err error, expectCodes []string) bool
- func NotFoundError(err error) bool
- func StringPointer(s string) *string
- type AgentConfig
- type BackendServerType
- type BlobstoreConfig
- type Catcher
- type CloudConfig
- type CloudConfigJson
- type Config
- func (c Config) EcsTeaClient(region string) (*rpc.Client, error)
- func (c Config) GetCrossRegions() (regions []string, err error)
- func (c Config) GetHttpRegistryClient(logger boshlog.Logger) registry.Client
- func (c Config) GetInstanceRegion(instanceId string) (region string, err error)
- func (c Config) GetRegistryClient(logger boshlog.Logger) RegistryManager
- func (c Config) NewEcsClient(region string) (*ecs.Client, error)
- func (c Config) NewOssClient(region string) (*oss.Client, error)
- func (c Config) NewSlbClient(region string) (*slb.Client, error)
- func (c Config) Validate() error
- type DiskCategory
- type DiskManager
- type DiskManagerImpl
- func (a DiskManagerImpl) AttachDisk(instCid string, diskCid string) error
- func (a DiskManagerImpl) ChangeDiskStatus(cid string, toStatus DiskStatus, checkFunc func(*ecs.Disk) (bool, error)) error
- func (a DiskManagerImpl) CreateDisk(region string, args *ecs.CreateDiskRequest) (cid string, err error)
- func (a DiskManagerImpl) CreateSnapshot(diskCid, snapshotName string) (snapshotId string, err error)
- func (a DiskManagerImpl) DeleteDisk(diskCid string) error
- func (a DiskManagerImpl) DeleteSnapshot(snapshotCid string) error
- func (a DiskManagerImpl) DetachDisk(instCid, diskCid string) error
- func (a DiskManagerImpl) GetDisk(diskCid string) (disk *ecs.Disk, err error)
- func (a DiskManagerImpl) GetDiskPath(path, diskId, instanceType string, category DiskCategory) string
- func (a DiskManagerImpl) GetDisks(instCid string) (disks []ecs.Disk, err error)
- func (a DiskManagerImpl) ModifyDiskAttribute(diskCid, name, description string) error
- func (a DiskManagerImpl) ResizeDisk(diskCid string, size int) error
- func (a DiskManagerImpl) WaitForDiskStatus(diskCid string, toStatus DiskStatus) (string, error)
- type DiskStatus
- type EipStatus
- type ImageFormatType
- type InnerType
- type InstanceManager
- type InstanceManagerImpl
- func (a InstanceManagerImpl) AddTags(cid string, tags map[string]string) error
- func (a InstanceManagerImpl) ChangeInstanceStatus(cid string, toStatus InstanceStatus, ...) error
- func (a InstanceManagerImpl) CleanupInstanceNetworkInterfaces(cid string, eniIds []string) error
- func (a InstanceManagerImpl) CreateInstance(region string, request map[string]interface{}) (string, error)
- func (a InstanceManagerImpl) DeleteInstance(cid string) error
- func (a InstanceManagerImpl) GetAttachedNetworkInterfaceIds(cid string) []string
- func (a InstanceManagerImpl) GetInstance(cid string) (inst *ecs.Instance, err error)
- func (a InstanceManagerImpl) GetInstanceStatus(cid string) (InstanceStatus, error)
- func (a InstanceManagerImpl) GetInstanceUserData()
- func (a InstanceManagerImpl) ModifyInstanceAttribute(cid, name, description string) error
- func (a InstanceManagerImpl) RebootInstance(cid string) error
- func (a InstanceManagerImpl) StartInstance(cid string) error
- func (a InstanceManagerImpl) StopInstance(cid string) error
- type InstanceStatus
- type Invoker
- type NetworkManager
- type NetworkManagerImpl
- func (a NetworkManagerImpl) BindEip(region, instanceId, eip string) error
- func (a NetworkManagerImpl) BindSLB(region, instanceId string, slbId string, weight int) error
- func (a NetworkManagerImpl) BindSlbServerGroup(region, instanceId string, slbServerGroupId string, weight int, port int) error
- func (a NetworkManagerImpl) DescribeEip(region, eip string) (eipAddress ecs.EipAddressInDescribeEipAddresses, err error)
- func (a NetworkManagerImpl) DescribeSecurityGroupAttribute(region, groupId string) (group ecs.DescribeSecurityGroupAttributeResponse, err error)
- func (a NetworkManagerImpl) JoinSecurityGroup(region, instanceId, groupId string) error
- func (a NetworkManagerImpl) WaitForEipStatus(region, eip string, toStatus EipStatus) error
- type OpenApi
- type OssManager
- type OssManagerImpl
- func (a OssManagerImpl) CreateBucket(name string, options ...oss.Option) error
- func (a OssManagerImpl) DeleteBucket(name string) error
- func (a OssManagerImpl) DeleteObject(bucket oss.Bucket, name string) error
- func (a OssManagerImpl) GetBucket(name string) (bucket *oss.Bucket, err error)
- func (a OssManagerImpl) MultipartUploadFile(bucket oss.Bucket, objectKey, filePath string, partSize int64, ...) error
- func (a OssManagerImpl) UploadFile(bucket oss.Bucket, objectKey, filePath string, partSize int64, ...) error
- type ProviderError
- type RegistryConfig
- type RegistryManager
- type SlbServerGroupBackendServerType
- type SpotStrategyType
- type StemcellManager
- type StemcellManagerImpl
- func (a StemcellManagerImpl) CopyImage(args *ecs.CopyImageRequest) (string, error)
- func (a StemcellManagerImpl) DeleteStemcell(id string) error
- func (a StemcellManagerImpl) FindStemcellById(id string) (*ecs.Image, error)
- func (a StemcellManagerImpl) FindStemcellByName(name string) (*ecs.Image, error)
- func (a StemcellManagerImpl) ImportImage(args *ecs.ImportImageRequest) (string, error)
- func (a StemcellManagerImpl) OpenLocalFile(path string) (*os.File, error)
- func (a StemcellManagerImpl) WaitForImage(regionId, imageId string, timeout int) error
- func (a StemcellManagerImpl) WaitForImageReady(id string) error
- type TagResourceType
Constants ¶
const ( TagResourceImage = TagResourceType("image") TagResourceInstance = TagResourceType("instance") TagResourceSnapshot = TagResourceType("snapshot") TagResourceDisk = TagResourceType("disk") )
const ( Creating = InstanceStatus("Creating") // For backward compatibility Pending = InstanceStatus("Pending") Running = InstanceStatus("Running") Starting = InstanceStatus("Starting") Stopped = InstanceStatus("Stopped") Stopping = InstanceStatus("Stopping") Deleted = InstanceStatus("Deleted") )
Constants of InstanceStatus
const ( EipStatusAssociating = EipStatus("Associating") EipStatusUnassociating = EipStatus("Unassociating") EipStatusInUse = EipStatus("InUse") EipStatusAvailable = EipStatus("Available") )
const ( DiskStatusInUse = DiskStatus("In_use") DiskStatusAvailable = DiskStatus("Available") DiskStatusAttaching = DiskStatus("Attaching") DiskStatusDetaching = DiskStatus("Detaching") DiskStatusCreating = DiskStatus("Creating") DiskStatusReIniting = DiskStatus("ReIniting") DiskStatusAll = DiskStatus("All") //Default )
const ( DiskCategoryAll = DiskCategory("all") //Default DiskCategoryCloud = DiskCategory("cloud") DiskCategoryEphemeral = DiskCategory("ephemeral") DiskCategoryEphemeralSSD = DiskCategory("ephemeral_ssd") DiskCategoryCloudEfficiency = DiskCategory("cloud_efficiency") DiskCategoryCloudSSD = DiskCategory("cloud_ssd") )
const ( NoSpot = SpotStrategyType("NoSpot") SpotWithPriceLimit = SpotStrategyType("SpotWithPriceLimit") SpotAsPriceGo = SpotStrategyType("SpotAsPriceGo") )
Constants of SpotStrategyType
const ( RAW = ImageFormatType("RAW") VHD = ImageFormatType("VHD") )
const ( UseForceStop = true WaitTimeout = time.Duration(600) * time.Second WaitInterval = time.Duration(5) * time.Second DefaultEipWaitSeconds = 120 DefaultSlbWeight = 100 BoshCPI = "Bosh-Alicloud-Cpi" BoshCPIVersion = "1.0" DefaultSlbServerGroupPort = 33333 DefaultSlbServerGroupWeight = 100 )
const ( ChangeDiskStatusTimeout = time.Duration(300) * time.Second ChangeDiskStatusSleepInterval = time.Duration(5) * time.Second )
const ( // common NotFound = "NotFound" WaitForTimeout = "WaitForTimeout" // ecs InstanceNotFound = "Instance.Notfound" RamInstanceNotFound = "Forbidden.InstanceNotFound" MessageInstanceNotFound = "instance is not found" //stemcell ImageIsImporting = "ImageIsImporting" )
const ( ChangeInstanceStatusTimeout = time.Duration(600) * time.Second ChangeInstanceStatusSleepInterval = time.Duration(5) * time.Second )
const ( AlicloudImageServiceTag = "AlicloudImageService" AlicloudDefaultImageName = "bosh-stemcell" AlicloudDefaultImageArchitecture = "x86_64" AlicloudDefaultImageOSType = "linux" WaitForImageReadyTimeout = 3600 DefaultWaitForImageReadyTimeout = 1800 DefaultWaitForInterval = 10 )
const (
AlicloudOssServiceTag = "AlicloudOssService"
)
Variables ¶
var CreateInstanceCatcher_IdempotentProcessing = Catcher{"IdempotentProcessing", 15, 5}
var CreateInstanceCatcher_IpUsed = Catcher{"InvalidPrivateIpAddress.Duplicated", 30, 10}
var CreateInstanceCatcher_IpUsed2 = Catcher{"InvalidIPAddress.AlreadyUsed", 30, 10}
var CreateInstanceCatcher_TokenProcessing = Catcher{"LastTokenProcessing", 15, 5}
var DeleteDiskCatcher = Catcher{"IncorrectDiskStatus.Initializing", 10, 15}
var DeleteInstanceCatcher = Catcher{"IncorrectInstanceStatus.Initializing", 20, 15}
var EcsInstanceNotFound = []string{"Instance.Notfound", "InvalidInstanceId.NotFound"}
var IncorrectInstanceStatusCatcher = Catcher{"IncorrectInstanceStatus", 30, 10}
var InstanceInvalidOperationConflictCatcher = Catcher{"InvalidOperation.Conflict", 20, 10}
var InternalErrorCatcher = Catcher{"InternalError", 60, 5}
var NetworkInterfaceInvalidOperationInvalidEniStateCacher = Catcher{"InvalidOperation.InvalidEniState", 60, 5}
var OperationConflictCatcher = Catcher{"OperationConflict", 60, 5}
var ResourceNotFound = []string{"InvalidResourceId.NotFound"}
var ServiceBusyCatcher = Catcher{"ServiceUnavailable", 60, 5}
Functions ¶
func AmendDiskPath ¶
func AmendDiskPath(path string, category DiskCategory) string
func DescribeDisks ¶
func GetNotFoundMessage ¶
func GetTimeErrorFromString ¶
func GetTimeoutMessage ¶
func IsExceptedErrors ¶
func NotFoundError ¶
func StringPointer ¶
Types ¶
type AgentConfig ¶
type AgentConfig struct { Ntp []string `json:"ntp"` Mbus string `json:"mbus"` Blobstore BlobstoreConfig `json:"blobstore"` }
type BackendServerType ¶
type BlobstoreConfig ¶
type BlobstoreConfig struct { Provider string `json:"provider"` Options map[string]interface{} `json:"options"` }
func (BlobstoreConfig) AsRegistrySettings ¶
func (a BlobstoreConfig) AsRegistrySettings() registry.BlobstoreSettings
type CloudConfig ¶
type CloudConfigJson ¶
type CloudConfigJson struct {
Root CloudConfig `json:"cloud"`
}
type Config ¶
type Config struct { OpenApi OpenApi `json:"alicloud"` Registry RegistryConfig `json:"registry"` Agent AgentConfig `json:"agent"` }
func NewConfigFromBytes ¶
func NewConfigFromFile ¶
func NewConfigFromFile(configFile string, fs boshsys.FileSystem) (Config, error)
func (Config) GetCrossRegions ¶
func (Config) GetHttpRegistryClient ¶
func (Config) GetInstanceRegion ¶
func (Config) GetRegistryClient ¶
func (c Config) GetRegistryClient(logger boshlog.Logger) RegistryManager
type DiskCategory ¶
type DiskCategory string
type DiskManager ¶
type DiskManager interface { GetDisks(instCid string) ([]ecs.Disk, error) GetDisk(diskCid string) (*ecs.Disk, error) CreateDisk(region string, args *ecs.CreateDiskRequest) (string, error) DeleteDisk(diskCid string) error AttachDisk(instCid, diskCid string) error DetachDisk(instCid, diskCid string) error ResizeDisk(diskCid string, sizeGB int) error ModifyDiskAttribute(diskCid, name, description string) error CreateSnapshot(diskCid string, snapshotName string) (string, error) DeleteSnapshot(snapshotCid string) error WaitForDiskStatus(diskCid string, toStatus DiskStatus) (string, error) ChangeDiskStatus(cid string, toStatus DiskStatus, checkFunc func(*ecs.Disk) (bool, error)) error GetDiskPath(path, diskId, instanceType string, category DiskCategory) string }
func NewDiskManager ¶
func NewDiskManager(config Config, logger boshlog.Logger) DiskManager
type DiskManagerImpl ¶
type DiskManagerImpl struct {
// contains filtered or unexported fields
}
func (DiskManagerImpl) AttachDisk ¶
func (a DiskManagerImpl) AttachDisk(instCid string, diskCid string) error
func (DiskManagerImpl) ChangeDiskStatus ¶
func (a DiskManagerImpl) ChangeDiskStatus(cid string, toStatus DiskStatus, checkFunc func(*ecs.Disk) (bool, error)) error
func (DiskManagerImpl) CreateDisk ¶
func (a DiskManagerImpl) CreateDisk(region string, args *ecs.CreateDiskRequest) (cid string, err error)
func (DiskManagerImpl) CreateSnapshot ¶
func (a DiskManagerImpl) CreateSnapshot(diskCid, snapshotName string) (snapshotId string, err error)
func (DiskManagerImpl) DeleteDisk ¶
func (a DiskManagerImpl) DeleteDisk(diskCid string) error
func (DiskManagerImpl) DeleteSnapshot ¶
func (a DiskManagerImpl) DeleteSnapshot(snapshotCid string) error
func (DiskManagerImpl) DetachDisk ¶
func (a DiskManagerImpl) DetachDisk(instCid, diskCid string) error
func (DiskManagerImpl) GetDisk ¶
func (a DiskManagerImpl) GetDisk(diskCid string) (disk *ecs.Disk, err error)
func (DiskManagerImpl) GetDiskPath ¶
func (a DiskManagerImpl) GetDiskPath(path, diskId, instanceType string, category DiskCategory) string
func (DiskManagerImpl) GetDisks ¶
func (a DiskManagerImpl) GetDisks(instCid string) (disks []ecs.Disk, err error)
func (DiskManagerImpl) ModifyDiskAttribute ¶
func (a DiskManagerImpl) ModifyDiskAttribute(diskCid, name, description string) error
func (DiskManagerImpl) ResizeDisk ¶
func (a DiskManagerImpl) ResizeDisk(diskCid string, size int) error
func (DiskManagerImpl) WaitForDiskStatus ¶
func (a DiskManagerImpl) WaitForDiskStatus(diskCid string, toStatus DiskStatus) (string, error)
type DiskStatus ¶
type DiskStatus string
type ImageFormatType ¶
type ImageFormatType string
type InstanceManager ¶
type InstanceManager interface { GetInstance(cid string) (*ecs.Instance, error) CreateInstance(region string, request map[string]interface{}) (string, error) ModifyInstanceAttribute(cid string, name string, description string) error AddTags(cid string, tags map[string]string) error DeleteInstance(cid string) error StartInstance(cid string) error StopInstance(cid string) error RebootInstance(cid string) error GetInstanceStatus(cid string) (InstanceStatus, error) // WaitForInstanceStatus(cid string, toStatus ecs.InstanceStatus) (ecs.InstanceStatus, error) ChangeInstanceStatus(cid string, toStatus InstanceStatus, checkFunc func(status InstanceStatus) (bool, error)) error // Cleanup the left network interfaces GetAttachedNetworkInterfaceIds(cid string) []string CleanupInstanceNetworkInterfaces(cid string, eniIds []string) error }
func NewInstanceManager ¶
func NewInstanceManager(config Config, logger boshlog.Logger) InstanceManager
type InstanceManagerImpl ¶
type InstanceManagerImpl struct {
// contains filtered or unexported fields
}
func (InstanceManagerImpl) AddTags ¶
func (a InstanceManagerImpl) AddTags(cid string, tags map[string]string) error
func (InstanceManagerImpl) ChangeInstanceStatus ¶
func (a InstanceManagerImpl) ChangeInstanceStatus(cid string, toStatus InstanceStatus, checkFunc func(status InstanceStatus) (bool, error)) error
func (InstanceManagerImpl) CleanupInstanceNetworkInterfaces ¶
func (a InstanceManagerImpl) CleanupInstanceNetworkInterfaces(cid string, eniIds []string) error
func (InstanceManagerImpl) CreateInstance ¶
func (a InstanceManagerImpl) CreateInstance(region string, request map[string]interface{}) (string, error)
func (InstanceManagerImpl) DeleteInstance ¶
func (a InstanceManagerImpl) DeleteInstance(cid string) error
func (InstanceManagerImpl) GetAttachedNetworkInterfaceIds ¶
func (a InstanceManagerImpl) GetAttachedNetworkInterfaceIds(cid string) []string
func (InstanceManagerImpl) GetInstance ¶
func (a InstanceManagerImpl) GetInstance(cid string) (inst *ecs.Instance, err error)
func (InstanceManagerImpl) GetInstanceStatus ¶
func (a InstanceManagerImpl) GetInstanceStatus(cid string) (InstanceStatus, error)
func (InstanceManagerImpl) GetInstanceUserData ¶
func (a InstanceManagerImpl) GetInstanceUserData()
func (InstanceManagerImpl) ModifyInstanceAttribute ¶
func (a InstanceManagerImpl) ModifyInstanceAttribute(cid, name, description string) error
func (InstanceManagerImpl) RebootInstance ¶
func (a InstanceManagerImpl) RebootInstance(cid string) error
func (InstanceManagerImpl) StartInstance ¶
func (a InstanceManagerImpl) StartInstance(cid string) error
func (InstanceManagerImpl) StopInstance ¶
func (a InstanceManagerImpl) StopInstance(cid string) error
type InstanceStatus ¶
type InstanceStatus string
type Invoker ¶
type Invoker struct {
// contains filtered or unexported fields
}
func NewInvoker ¶
func NewInvoker() Invoker
func (*Invoker) AddCatcher ¶
type NetworkManager ¶
type NetworkManager interface { DescribeEip(region, eip string) (ecs.EipAddressInDescribeEipAddresses, error) BindEip(region, instanceId, eip string) error WaitForEipStatus(region, eip string, toStatus EipStatus) error BindSLB(region, instanceId, slbId string, weight int) error BindSlbServerGroup(region, instanceId, slbId string, weight int, port int) error DescribeSecurityGroupAttribute(region, groupId string) (ecs.DescribeSecurityGroupAttributeResponse, error) JoinSecurityGroup(region, instanceId, groupId string) error }
func NewNetworkManager ¶
func NewNetworkManager(config Config, logger boshlog.Logger) NetworkManager
type NetworkManagerImpl ¶
type NetworkManagerImpl struct {
// contains filtered or unexported fields
}
func (NetworkManagerImpl) BindEip ¶
func (a NetworkManagerImpl) BindEip(region, instanceId, eip string) error
func (NetworkManagerImpl) BindSLB ¶
func (a NetworkManagerImpl) BindSLB(region, instanceId string, slbId string, weight int) error
TODO: add retry
func (NetworkManagerImpl) BindSlbServerGroup ¶
func (NetworkManagerImpl) DescribeEip ¶
func (a NetworkManagerImpl) DescribeEip(region, eip string) (eipAddress ecs.EipAddressInDescribeEipAddresses, err error)
func (NetworkManagerImpl) DescribeSecurityGroupAttribute ¶
func (a NetworkManagerImpl) DescribeSecurityGroupAttribute(region, groupId string) (group ecs.DescribeSecurityGroupAttributeResponse, err error)
func (NetworkManagerImpl) JoinSecurityGroup ¶
func (a NetworkManagerImpl) JoinSecurityGroup(region, instanceId, groupId string) error
func (NetworkManagerImpl) WaitForEipStatus ¶
func (a NetworkManagerImpl) WaitForEipStatus(region, eip string, toStatus EipStatus) error
type OpenApi ¶
type OpenApi struct { Region string `json:"region"` AvailabilityZone string `json:"availability_zone"` AccessEndpoint string `json:"access_endpoint"` AccessKeyId string `json:"access_key_id"` AccessKeySecret string `json:"access_key_secret"` SecurityToken string `json:"security_token"` Encrypted *bool `json:"encrypted,omitempty"` KmsKeyId string `json:"kms_key_id"` EcsEndpoint string `json:"ecs_endpoint"` SlbEndpoint string `json:"slb_endpoint"` OssEndpoint string `json:"oss_endpoint"` LocationEndpoint string `json:"location_endpoint"` }
func (OpenApi) GetAvailabilityZone ¶
type OssManager ¶
type OssManager interface { CreateBucket(name string, options ...oss.Option) error DeleteBucket(name string) error GetBucket(name string) (bucket *oss.Bucket, err error) UploadFile(bucket oss.Bucket, objectKey, filePath string, partSize int64, options ...oss.Option) error MultipartUploadFile(bucket oss.Bucket, objectKey, filePath string, partSize int64, options ...oss.Option) error DeleteObject(bucket oss.Bucket, name string) error }
func NewOssManager ¶
func NewOssManager(config Config, logger boshlog.Logger) OssManager
type OssManagerImpl ¶
type OssManagerImpl struct {
// contains filtered or unexported fields
}
func (OssManagerImpl) CreateBucket ¶
func (a OssManagerImpl) CreateBucket(name string, options ...oss.Option) error
func (OssManagerImpl) DeleteBucket ¶
func (a OssManagerImpl) DeleteBucket(name string) error
func (OssManagerImpl) DeleteObject ¶
func (a OssManagerImpl) DeleteObject(bucket oss.Bucket, name string) error
func (OssManagerImpl) GetBucket ¶
func (a OssManagerImpl) GetBucket(name string) (bucket *oss.Bucket, err error)
func (OssManagerImpl) MultipartUploadFile ¶
func (OssManagerImpl) UploadFile ¶
type ProviderError ¶
type ProviderError struct {
// contains filtered or unexported fields
}
An Error represents a custom error for Terraform failure response
func (*ProviderError) Error ¶
func (e *ProviderError) Error() string
func (*ProviderError) ErrorCode ¶
func (err *ProviderError) ErrorCode() string
func (*ProviderError) Message ¶
func (err *ProviderError) Message() string
type RegistryConfig ¶
type RegistryConfig struct { User string `json:"user"` Password string `json:"password"` Protocol string `json:"protocol"` Host string `json:"host"` Port json.Number `json:"port"` }
func (RegistryConfig) GetEndpoint ¶
func (a RegistryConfig) GetEndpoint() string
func (RegistryConfig) IsEmpty ¶
func (a RegistryConfig) IsEmpty() bool
func (RegistryConfig) ToInstanceUserData ¶
func (a RegistryConfig) ToInstanceUserData() string
type RegistryManager ¶
type RegistryManager struct {
// contains filtered or unexported fields
}
func NewRegistryManager ¶
func NewRegistryManager(c Config, logger boshlog.Logger) RegistryManager
func (RegistryManager) Delete ¶
func (a RegistryManager) Delete(instanceID string) error
func (RegistryManager) Fetch ¶
func (a RegistryManager) Fetch(instanceID string) (registry.AgentSettings, error)
func (RegistryManager) Update ¶
func (a RegistryManager) Update(instanceID string, settings registry.AgentSettings) error
type SpotStrategyType ¶
type SpotStrategyType string
type StemcellManager ¶
type StemcellManager interface { FindStemcellById(id string) (*ecs.Image, error) DeleteStemcell(id string) error ImportImage(args *ecs.ImportImageRequest) (string, error) CopyImage(args *ecs.CopyImageRequest) (string, error) OpenLocalFile(path string) (*os.File, error) WaitForImageReady(id string) error }
func NewStemcellManager ¶
func NewStemcellManager(config Config, logger boshlog.Logger) StemcellManager
type StemcellManagerImpl ¶
type StemcellManagerImpl struct {
// contains filtered or unexported fields
}
func (StemcellManagerImpl) CopyImage ¶
func (a StemcellManagerImpl) CopyImage(args *ecs.CopyImageRequest) (string, error)
func (StemcellManagerImpl) DeleteStemcell ¶
func (a StemcellManagerImpl) DeleteStemcell(id string) error
func (StemcellManagerImpl) FindStemcellById ¶
func (a StemcellManagerImpl) FindStemcellById(id string) (*ecs.Image, error)
func (StemcellManagerImpl) FindStemcellByName ¶
func (a StemcellManagerImpl) FindStemcellByName(name string) (*ecs.Image, error)
func (StemcellManagerImpl) ImportImage ¶
func (a StemcellManagerImpl) ImportImage(args *ecs.ImportImageRequest) (string, error)
func (StemcellManagerImpl) OpenLocalFile ¶
func (a StemcellManagerImpl) OpenLocalFile(path string) (*os.File, error)
func (StemcellManagerImpl) WaitForImage ¶
func (a StemcellManagerImpl) WaitForImage(regionId, imageId string, timeout int) error
Wait Image ready
func (StemcellManagerImpl) WaitForImageReady ¶
func (a StemcellManagerImpl) WaitForImageReady(id string) error
import image from oss may take >=15min we set timeout value to 30min, if needed turn it up
type TagResourceType ¶
type TagResourceType string