hetzner

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provisioner

type Provisioner struct {
	// contains filtered or unexported fields
}

func New

func New(token string) *Provisioner

New creates a new Hetzner Cloud WorkerProvisioner.

func (*Provisioner) CreateServer

func (p *Provisioner) CreateServer(ctx context.Context, name, serverType, location, sshPubKey, userData string) (int64, string, error)

CreateServer creates a Hetzner Cloud server (for the provision command). It returns the server ID and public IP.

func (*Provisioner) CreateWorker

func (*Provisioner) DeleteWorker

func (p *Provisioner) DeleteWorker(ctx context.Context, resourceID string) error

DeleteWorker destroys a Hetzner server. Returns nil if the server is already gone (idempotent).

func (*Provisioner) EnsureSSHKey

func (p *Provisioner) EnsureSSHKey(ctx context.Context, pubKey string) (string, error)

func (*Provisioner) GetWorkerStatus

func (p *Provisioner) GetWorkerStatus(ctx context.Context, resourceID string) (*infra.WorkerStatus, error)

func (*Provisioner) ListLocations

func (p *Provisioner) ListLocations(ctx context.Context) ([]infra.Region, error)

ListLocations returns available locations for the provision wizard.

func (*Provisioner) ListRegions

func (p *Provisioner) ListRegions(ctx context.Context) ([]infra.Region, error)

func (*Provisioner) ListServerTypes

func (p *Provisioner) ListServerTypes(ctx context.Context) ([]infra.Size, error)

ListServerTypes returns available server types for the provision wizard.

func (*Provisioner) ListSizes

func (p *Provisioner) ListSizes(ctx context.Context) ([]infra.Size, error)

func (*Provisioner) WaitForServer

func (p *Provisioner) WaitForServer(ctx context.Context, serverID int64) (string, error)

WaitForServer polls until the server is running and returns its IP.

Jump to

Keyboard shortcuts

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