Documentation ¶
Index ¶
- type AutoScaleOpt
- type AutoScaleServerOption
- type ClusterCredentials
- type CreateDNSRecordResponse
- type CreateK8sResponse
- type CreateServerGroupResponse
- type CreateServerResponse
- type CreateStaticIPResponse
- type ImageServerOption
- type K8sVersionServerOption
- type RegionServerOption
- type ServerInfo
- type ServerOption
- func AutoScale(opt *AutoScaleOpt) ServerOption
- func K8sVersion(version string) ServerOption
- func ServerImage(image string) ServerOption
- func ServerRegion(region string) ServerOption
- func ServerSize(size string) ServerOption
- func ServerTags(tags []string) ServerOption
- func ServerUserData(userdata string) ServerOption
- type SizeServerOption
- type StaticIPRequest
- type StaticIPType
- type TagsServerOption
- type UserDataServerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoScaleOpt ¶
AutoScaleOpt contains fields for k8s autoscaling
type AutoScaleServerOption ¶
type AutoScaleServerOption struct {
AutoScale *AutoScaleOpt
}
AutoScaleServerOption configures the k8s autoscaling
func (AutoScaleServerOption) Set ¶
func (o AutoScaleServerOption) Set(s *ServerInfo) error
Set sets the k8s autoscaling
type ClusterCredentials ¶
ClusterCredentials contain credentials for the k8s cluster
type CreateDNSRecordResponse ¶
CreateDNSRecordResponse contains the response from DNS record creation
type CreateK8sResponse ¶
type CreateK8sResponse struct { Name string ClusterID interface{} ClusterRegion string EndpointIP string EndpointPort string Credentials *ClusterCredentials }
CreateK8sResponse contains the response from K8s deployment
type CreateServerGroupResponse ¶
type CreateServerGroupResponse struct { Name string ServerGroupID interface{} ServerGroupRegion string LoadBalancerID string LoadBalancerIP string }
CreateServerGroupResponse contains the reponse from creating a server group
type CreateServerResponse ¶
type CreateServerResponse struct { Name string ServerID interface{} ServerRegion string ServerIP string }
CreateServerResponse contains the response from server creation
type CreateStaticIPResponse ¶
type CreateStaticIPResponse struct { Name string StaticIP string Type StaticIPType Region string }
CreateStaticIPResponse contains the response from creating a static IP
type ImageServerOption ¶
type ImageServerOption struct {
Image string
}
ImageServerOption configures the server image
func (ImageServerOption) Set ¶
func (o ImageServerOption) Set(s *ServerInfo) error
Set sets the server image
type K8sVersionServerOption ¶
type K8sVersionServerOption struct {
Version string
}
K8sVersionServerOption configures the k8s version
func (K8sVersionServerOption) Set ¶
func (o K8sVersionServerOption) Set(s *ServerInfo) error
Set sets the k8s autoscaling
type RegionServerOption ¶
type RegionServerOption struct {
Region string
}
RegionServerOption configures the server region
func (RegionServerOption) Set ¶
func (o RegionServerOption) Set(s *ServerInfo) error
Set sets the server region
type ServerInfo ¶
type ServerInfo struct { Name string Size string AutoScale *AutoScaleOpt Region string Image string K8sVersion string UserData string Tags []string }
ServerInfo contains configuration information for the server
type ServerOption ¶
type ServerOption interface {
Set(*ServerInfo) error
}
ServerOption configures a server for creation
func AutoScale ¶
func AutoScale(opt *AutoScaleOpt) ServerOption
AutoScale returns a ServerOption that sets the k8s autoscaling
func K8sVersion ¶
func K8sVersion(version string) ServerOption
K8sVersion returns a ServerOption that sets the k8s version
func ServerImage ¶
func ServerImage(image string) ServerOption
ServerImage returns a ServerOption that sets the image
func ServerRegion ¶
func ServerRegion(region string) ServerOption
ServerRegion returns a ServerOption that sets the region
func ServerSize ¶
func ServerSize(size string) ServerOption
ServerSize returns a ServerOption that sets the size
func ServerTags ¶
func ServerTags(tags []string) ServerOption
ServerTags returns a ServerOption that sets the tags
func ServerUserData ¶
func ServerUserData(userdata string) ServerOption
ServerUserData returns a ServerOption that sets the UserData
type SizeServerOption ¶
type SizeServerOption struct {
Size string
}
SizeServerOption configures the server size
func (SizeServerOption) Set ¶
func (o SizeServerOption) Set(s *ServerInfo) error
Set sets the server size
type StaticIPRequest ¶
type StaticIPRequest struct { IPType StaticIPType Region string }
StaticIPRequest contains the requested static IP type and region (for regional IPs)
type StaticIPType ¶
type StaticIPType int
StaticIPType enums the type of static IP
const ( // GLOBAL static IP GLOBAL StaticIPType = 0 // REGIONAL static IP REGIONAL StaticIPType = 1 )
type TagsServerOption ¶
type TagsServerOption struct {
Tags []string
}
TagsServerOption configures the server tags
func (TagsServerOption) Set ¶
func (o TagsServerOption) Set(s *ServerInfo) error
Set sets the server tags
type UserDataServerOption ¶
type UserDataServerOption struct {
UserData string
}
UserDataServerOption configures the server UserData with cloud-init
func (UserDataServerOption) Set ¶
func (o UserDataServerOption) Set(s *ServerInfo) error
Set sets the server UserData