driver

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPlan     = "1xCPU-2GB"
	DefaultHostname = "custom"
)

Variables

This section is empty.

Functions

This section is empty.

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 DriverConfig struct {
	Username    string
	Password    string
	Timeout     time.Duration
	SSHUsername string
}

type ServerOpts

type ServerOpts struct {
	StorageUuid  string
	StorageSize  int
	Zone         string
	SshPublicKey string
	Networking   []request.CreateServerInterface
}

Jump to

Keyboard shortcuts

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