common

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoScaleOpt

type AutoScaleOpt struct {
	Enabled  bool
	MinNodes int64
	MaxNodes int64
}

AutoScaleOpt contains fields for k8s autoscaling

type AutoScaleServerOption

type AutoScaleServerOption struct {
	AutoScale *AutoScaleOpt
}

AutoScaleServerOption configures the k8s autoscaling

func (AutoScaleServerOption) Set

Set sets the k8s autoscaling

type ClusterCredentials

type ClusterCredentials struct {
	Username    string
	Password    string
	Certificate string
}

ClusterCredentials contain credentials for the k8s cluster

type CreateDNSRecordResponse

type CreateDNSRecordResponse struct {
	SubDomain   string
	SubDomainID interface{}
	SubDomainIP string
}

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

Set sets the server image

type K8sVersionServerOption

type K8sVersionServerOption struct {
	Version string
}

K8sVersionServerOption configures the k8s version

func (K8sVersionServerOption) Set

Set sets the k8s autoscaling

type RegionServerOption

type RegionServerOption struct {
	Region string
}

RegionServerOption configures the server region

func (RegionServerOption) Set

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

Set sets the server UserData

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL