driver

package
v0.0.0-...-d97bd3b Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	*drivers.BaseDriver

	AccessToken string
	Image       string
	ImageID     int64
	ImageArch   hcloud.Architecture

	Type string

	Location string

	KeyID int64

	IsExistingKey bool

	ServerID int64

	Volumes           []string
	Networks          []string
	UsePrivateNetwork bool
	DisablePublic4    bool
	DisablePublic6    bool
	PrimaryIPv4       string

	PrimaryIPv6 string

	Firewalls    []string
	ServerLabels map[string]string

	AdditionalKeys   []string
	AdditionalKeyIDs []int64

	WaitOnError           int
	WaitOnPolling         int
	WaitForRunningTimeout int
	// contains filtered or unexported fields
}

Driver contains hetzner-specific data to implement drivers.Driver

func NewDriver

func NewDriver(version string) *Driver

NewDriver initializes a new driver instance; see drivers.Driver.NewDriver

func (*Driver) Create

func (d *Driver) Create() error

Create actually creates the hetzner-cloud server; see drivers.Driver.Create

func (*Driver) DriverName

func (d *Driver) DriverName() string

DriverName returns the hard-coded string "hetzner"; see drivers.Driver.DriverName

func (*Driver) GetCreateFlags

func (d *Driver) GetCreateFlags() []mcnflag.Flag

GetCreateFlags retrieves additional driver-specific arguments; see drivers.Driver.GetCreateFlags

func (*Driver) GetSSHHostname

func (d *Driver) GetSSHHostname() (string, error)

GetSSHHostname retrieves the SSH host to connect to the machine; see drivers.Driver.GetSSHHostname

func (*Driver) GetSSHPort

func (d *Driver) GetSSHPort() (int, error)

GetSSHPort retrieves the port used to connect to the server during provisioning

func (*Driver) GetSSHUsername

func (d *Driver) GetSSHUsername() string

GetSSHUsername retrieves the SSH username used to connect to the server during provisioning

func (*Driver) GetState

func (d *Driver) GetState() (state.State, error)

GetState retrieves the state the machine is currently in; see drivers.Driver.GetState

func (*Driver) GetURL

func (d *Driver) GetURL() (string, error)

GetURL retrieves the URL of the docker daemon on the machine; see drivers.Driver.GetURL

func (*Driver) Kill

func (d *Driver) Kill() error

Kill forcefully shuts down the hetzner cloud server; see drivers.Driver.Kill

func (*Driver) PreCreateCheck

func (d *Driver) PreCreateCheck() error

PreCreateCheck validates the Driver data is in a valid state for creation; see drivers.Driver.PreCreateCheck

func (*Driver) Remove

func (d *Driver) Remove() error

Remove deletes the hetzner server and additional resources created during creation; see drivers.Driver.Remove

func (*Driver) Restart

func (d *Driver) Restart() error

Restart instructs the hetzner cloud server to reboot; see drivers.Driver.Restart

func (*Driver) SetConfigFromFlags

func (d *Driver) SetConfigFromFlags(opts drivers.DriverOptions) error

SetConfigFromFlags handles additional driver arguments as retrieved by Driver.GetCreateFlags; see drivers.Driver.SetConfigFromFlags

func (*Driver) Start

func (d *Driver) Start() error

Start instructs the hetzner cloud server to power up; see drivers.Driver.Start

func (*Driver) Stop

func (d *Driver) Stop() error

Stop instructs the hetzner cloud server to shut down; see drivers.Driver.Stop

Jump to

Keyboard shortcuts

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