Documentation ¶
Index ¶
- Constants
- func ConvertNetworkTypes(rawNetworking []NetworkInterface) []request.CreateServerInterface
- func GetNowString() string
- func GetServerIp(details *upcloud.ServerDetails) (string, error)
- func SshHostCallback(state multistep.StateBag) (string, error)
- func StepHaltWithError(state multistep.StateBag, err error) multistep.StepAction
- type Driver
- type DriverConfig
- type IPAddress
- type NetworkInterface
- type ServerOpts
Constants ¶
View Source
const (
DefaultPlan = "1xCPU-2GB"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertNetworkTypes ¶
func ConvertNetworkTypes(rawNetworking []NetworkInterface) []request.CreateServerInterface
func GetNowString ¶
func GetNowString() string
func GetServerIp ¶
func GetServerIp(details *upcloud.ServerDetails) (string, error)
parse public ip from server details
func SshHostCallback ¶
SshHostCallback retrieves the public IPv4 address of the server
func StepHaltWithError ¶
func StepHaltWithError(state multistep.StateBag, err error) multistep.StepAction
wraps error logic
Types ¶
type Driver ¶
type Driver interface { CreateServer(*ServerOpts) (*upcloud.ServerDetails, error) DeleteServer(string) error StopServer(string) error GetStorage(string, string) (*upcloud.Storage, error) GetServerStorage(string) (*upcloud.ServerStorageDevice, error) CloneStorage(string, string, string) (*upcloud.Storage, error) CreateTemplate(string, string) (*upcloud.Storage, error) DeleteTemplate(string) error }
func NewDriver ¶
func NewDriver(c *DriverConfig) Driver
type DriverConfig ¶
type NetworkInterface ¶
type NetworkInterface struct { IPAddresses []IPAddress `mapstructure:"ip_addresses"` Type string `mapstructure:"type"` Network string `mapstructure:"network,omitempty"` }
for config type convertion
type ServerOpts ¶
Click to show internal directories.
Click to hide internal directories.