Documentation
¶
Index ¶
- Constants
- type APICert
- type Activator
- type Agent
- type Cloud
- func (c *Cloud) CreateInstance(in Instance) (Instance, error)
- func (c *Cloud) DestroyInstance(ID string) error
- func (c *Cloud) GetInstanceIDbyIP(IP string) (Instance, error)
- func (c *Cloud) InspectInstance(ID string) (Instance, error)
- func (c *Cloud) ListInstance() ([]Instance, error)
- func (c *Cloud) ListProvider() ([][]string, error)
- func (c *Cloud) ListRegion() (map[string][]Region, error)
- func (c *Cloud) ListSpec() (map[string][]Spec, error)
- func (c *Cloud) RegisterProvider(validater Validater, actvrs ...Activator) error
- func (c Cloud) WaitInstance(in Instance) error
- type Deployer
- type Instance
- type Provider
- type Region
- type Spec
- type Validater
Constants ¶
const InstanceTag = "OUTLINER_AUTO_SETUP"
InstanceTag instance create by outliner should have this tag
const SSHKeyName = "OUTLINER_AUTO_SSH"
SSHKeyName ssh keys name in cloud
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activator ¶
type Activator interface { ListTokenName() []string // list Token names for register VerifyToken(string) bool // verify api key & availability GenProvider(string) Provider // Gen a Provider }
Activator object before generate a Provider
type Agent ¶
type Agent interface { GetCredentialPub() string Deploy(string) error Watch(string) error GetServiceCert(string) (APICert, error) }
Agent defin deply Agent methods
type Cloud ¶
type Cloud struct {
// contains filtered or unexported fields
}
Cloud core object for outliner
func (*Cloud) CreateInstance ¶
CreateInstance create a instance on server Provider
func (*Cloud) DestroyInstance ¶
DestroyInstance destroy a instanceon server Provider
func (*Cloud) GetInstanceIDbyIP ¶
GetInstanceIDbyIP Inspect Instance
func (*Cloud) InspectInstance ¶
InspectInstance Inspect Instance
func (*Cloud) ListInstance ¶
ListInstance list all instances create by outliner
func (*Cloud) ListProvider ¶
ListProvider show avalible Providers
func (*Cloud) ListRegion ¶
ListRegion show avalible Regions on Providers
func (*Cloud) RegisterProvider ¶
RegisterProvider Register a cloud Provider whith Validater function
func (Cloud) WaitInstance ¶
WaitInstance wait instance to boot
type Deployer ¶
type Deployer struct {
// contains filtered or unexported fields
}
Deployer core object for outliner
func (Deployer) DeployService ¶
DeployService deploy service
func (Deployer) GetCredentialPub ¶
GetCredentialPub Get CredentialPub
func (Deployer) GetServiceCert ¶
GetServiceCert get service cert
func (Deployer) WaitService ¶
WaitService wait service
type Instance ¶
type Instance struct { ID string Provider string IPv4 string Spec Spec Region Region SSHKey string APICert APICert }
Instance info about server create on server provider
type Provider ¶
type Provider interface { Name() string // provider's name GetToken() string // provider's verified Token ListSpec() ([]Spec, error) // list provider Instance Spec ListRegion() ([]Region, error) // list provider's available regions ListInstance() ([]Instance, error) // list created instance on provider CreateInstance(Instance) (Instance, error) // create instance on provider WaitInstance(Instance) error // get info about instance and vpn DestroyInstance(string) error // destroy instance on provider }
Provider defin server provider methods