Documentation ¶
Overview ¶
Package cpt provides common interfaces for creating on-demand servers with various providers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudProvider ¶
type CloudProvider interface { CreateServer(ctx context.Context, name string, opts ...common.ServerOption) (*common.CreateServerResponse, error) RemoveServer(ctx context.Context, server *common.CreateServerResponse) error CreateServerGroup(ctx context.Context, name string, opts ...common.ServerOption) (*common.CreateServerGroupResponse, error) RemoveServerGroup(ctx context.Context, group *common.CreateServerGroupResponse) error CreateK8s(ctx context.Context, name string, opts ...common.ServerOption) (*common.CreateK8sResponse, error) RemoveK8s(ctx context.Context, k8s *common.CreateK8sResponse) error CreateDNSRecord(ctx context.Context, name string, IP string) (*common.CreateDNSRecordResponse, error) RemoveDNSRecord(ctx context.Context, subDomain *common.CreateDNSRecordResponse) error CreateStaticIP(ctx context.Context, name string, ipType *common.StaticIPRequest) (*common.CreateStaticIPResponse, error) RemoveStaticIP(ctx context.Context, staticIP *common.CreateStaticIPResponse) error }
CloudProvider implements methods for creating/removing serves
func NewCloudProvider ¶
func NewCloudProvider(pt ProviderType) (CloudProvider, error)
NewCloudProvider returns a CloudProvider instance
type ProviderType ¶
type ProviderType int
ProviderType provides an enum for cloud providers
const ( // DIGITALOCEAN provider DIGITALOCEAN ProviderType = 0 // AWS provider AWS ProviderType = 1 // GCE provider GCE ProviderType = 2 // AZURE provider AZURE ProviderType = 3 )
Directories ¶
Path | Synopsis |
---|---|
Package digitalocean implements methods to create servers on DigitalOcean
|
Package digitalocean implements methods to create servers on DigitalOcean |
examples
|
|
Click to show internal directories.
Click to hide internal directories.