Documentation ¶
Index ¶
- type GpuInfo
- type HealthCheckerInfo
- type HealthInfo
- type IID
- type ImageHandler
- type ImageInfo
- type ImageReqInfo
- type KeyPairHandler
- type KeyPairInfo
- type KeyPairReqInfo
- type KeyValue
- type ListenerInfo
- type NLBHandler
- type NLBInfo
- type RegionInfo
- type SecurityHandler
- type SecurityInfo
- type SecurityReqInfo
- type SecurityRuleInfo
- type SubnetInfo
- type VCpuInfo
- type VMGroupInfo
- type VMHandler
- type VMInfo
- type VMReqInfo
- type VMSpecHandler
- type VMSpecInfo
- type VMStatus
- type VMStatusInfo
- type VPCHandler
- type VPCInfo
- type VPCReqInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthCheckerInfo ¶ added in v0.5.5
type HealthCheckerInfo struct { Protocol string // TCP|HTTP|HTTPS Port string // Listener Port or 1-65535 Interval int // secs, Interval time between health checks. Timeout int // secs, Waiting time to decide an unhealthy VM when no response. Threshold int // num, The number of continuous health checks to change the VM status. CspID string // Optional, May be Used by Driver. KeyValueList []KeyValue }
type HealthInfo ¶ added in v0.5.6
type ImageHandler ¶
type ImageReqInfo ¶
type ImageReqInfo struct {
IId IID // {NameId, SystemId}
}
type KeyPairHandler ¶
type KeyPairHandler interface { CreateKey(keyPairReqInfo KeyPairReqInfo) (KeyPairInfo, error) ListKey() ([]*KeyPairInfo, error) GetKey(keyIID IID) (KeyPairInfo, error) DeleteKey(keyIID IID) (bool, error) }
type KeyPairInfo ¶
type KeyPairReqInfo ¶
type KeyPairReqInfo struct {
IId IID // {NameId, SystemId}
}
type ListenerInfo ¶ added in v0.5.5
type NLBHandler ¶ added in v0.5.5
type NLBHandler interface { //------ NLB Management CreateNLB(nlbReqInfo NLBInfo) (NLBInfo, error) ListNLB() ([]*NLBInfo, error) GetNLB(nlbIID IID) (NLBInfo, error) DeleteNLB(nlbIID IID) (bool, error) //------ Frontend Control ChangeListener(nlbIID IID, listener ListenerInfo) (ListenerInfo, error) //------ Backend Control ChangeVMGroupInfo(nlbIID IID, vmGroup VMGroupInfo) (VMGroupInfo, error) AddVMs(nlbIID IID, vmIIDs *[]IID) (VMGroupInfo, error) RemoveVMs(nlbIID IID, vmIIDs *[]IID) (bool, error) GetVMGroupHealthInfo(nlbIID IID) (HealthInfo, error) ChangeHealthCheckerInfo(nlbIID IID, healthChecker HealthCheckerInfo) (HealthCheckerInfo, error) }
-------- API
type NLBInfo ¶ added in v0.5.5
type NLBInfo struct { IId IID // {NameId, SystemId} VpcIID IID // {NameId, SystemId} Type string // PUBLIC(V) | INTERNAL Scope string // REGION(V) | GLOBAL //------ Frontend Listener ListenerInfo //------ Backend VMGroup VMGroupInfo HealthChecker HealthCheckerInfo CreatedTime time.Time KeyValueList []KeyValue }
-------- Info Structure
type RegionInfo ¶
type SecurityHandler ¶
type SecurityHandler interface { CreateSecurity(securityReqInfo SecurityReqInfo) (SecurityInfo, error) ListSecurity() ([]*SecurityInfo, error) GetSecurity(securityIID IID) (SecurityInfo, error) DeleteSecurity(securityIID IID) (bool, error) AddRules(sgIID IID, securityRules *[]SecurityRuleInfo) (SecurityInfo, error) RemoveRules(sgIID IID, securityRules *[]SecurityRuleInfo) (bool, error) }
type SecurityInfo ¶
type SecurityInfo struct { IId IID // {NameId, SystemId} VpcIID IID // {NameId, SystemId} //Direction string // @todo userd?? SecurityRules *[]SecurityRuleInfo KeyValueList []KeyValue }
type SecurityReqInfo ¶
type SecurityReqInfo struct { IId IID // {NameId, SystemId} VpcIID IID // {NameId, SystemId} //Direction string // To be deprecated SecurityRules *[]SecurityRuleInfo }
type SecurityRuleInfo ¶
type SecurityRuleInfo struct { Direction string IPProtocol string FromPort string ToPort string CIDR string }
@definitionAlias cres.SecurityRuleInfo
type SubnetInfo ¶ added in v0.1.3
type VMGroupInfo ¶ added in v0.5.6
type VMHandler ¶
type VMHandler interface { StartVM(vmReqInfo VMReqInfo) (VMInfo, error) SuspendVM(vmIID IID) (VMStatus, error) ResumeVM(vmIID IID) (VMStatus, error) RebootVM(vmIID IID) (VMStatus, error) TerminateVM(vmIID IID) (VMStatus, error) ListVMStatus() ([]*VMStatusInfo, error) GetVMStatus(vmIID IID) (VMStatus, error) ListVM() ([]*VMInfo, error) GetVM(vmIID IID) (VMInfo, error) }
type VMInfo ¶
type VMInfo struct { IId IID // {NameId, SystemId} StartTime time.Time // Timezone: based on cloud-barista server location. Region RegionInfo // ex) {us-east1, us-east1-c} or {ap-northeast-2} ImageIId IID VMSpecName string // instance type or flavour, etc... ex) t2.micro or f1.micro VpcIID IID SubnetIID IID // AWS, ex) subnet-8c4a53e4 SecurityGroupIIds []IID // AWS, ex) sg-0b7452563e1121bb6 KeyPairIId IID RootDiskType string // "SSD(gp2)", "Premium SSD", ... RootDiskSize string // "default", "50", "1000" (GB) RootDeviceName string // "/dev/sda1", ... VMBootDisk string // Deprecated soon VMBlockDisk string // ex) VMUserId string // ex) user1 VMUserPasswd string NetworkInterface string // ex) eth0 PublicIP string PublicDNS string PrivateIP string PrivateDNS string SSHAccessPoint string // ex) 10.2.3.2:22, 123.456.789.123:4321 KeyValueList []KeyValue }
type VMReqInfo ¶
type VMReqInfo struct { IId IID // {NameId, SystemId} ImageIID IID VpcIID IID SubnetIID IID SecurityGroupIIDs []IID VMSpecName string KeyPairIID IID RootDiskType string // "", "SSD(gp2)", "Premium SSD", ... RootDiskSize string // "", "default", "50", "1000" (GB) VMUserId string VMUserPasswd string }
type VMSpecHandler ¶
type VMSpecHandler interface { ListVMSpec() ([]*VMSpecInfo, error) GetVMSpec(Name string) (VMSpecInfo, error) ListOrgVMSpec() (string, error) // return string: json format GetOrgVMSpec(Name string) (string, error) // return string: json format }
type VMSpecInfo ¶
type VMStatus ¶
type VMStatus string
GO do not support Enum. So, define like this.
const ( Creating VMStatus = "Creating" // from launch to running Running VMStatus = "Running" Suspending VMStatus = "Suspending" // from running to suspended Suspended VMStatus = "Suspended" Resuming VMStatus = "Resuming" // from suspended to running Rebooting VMStatus = "Rebooting" // from running to running Terminating VMStatus = "Terminating" // from running, suspended to terminated Terminated VMStatus = "Terminated" NotExist VMStatus = "NotExist" // VM does not exist Failed VMStatus = "Failed" )
type VMStatusInfo ¶
type VPCHandler ¶ added in v0.1.3
type VPCInfo ¶ added in v0.1.3
type VPCInfo struct { IId IID // {NameId, SystemId} IPv4_CIDR string SubnetInfoList []SubnetInfo KeyValueList []KeyValue }
type VPCReqInfo ¶ added in v0.1.3
type VPCReqInfo struct { IId IID // {NameId, SystemId} IPv4_CIDR string SubnetInfoList []SubnetInfo }
Click to show internal directories.
Click to hide internal directories.