hetzner

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SSH_USERNAME = "devpod"
	SSH_PORT     = 22
)

Variables

View Source
var (
	ErrBadSSHKey            = errors.New("bad ssh key")
	ErrMultipleServersFound = func(name string) error {
		return fmt.Errorf("multiple server with name %s found", name)
	}
	ErrMultipleVolumesFound = func(name string) error {
		return fmt.Errorf("multiple volumes with name %s found", name)
	}
	ErrUnknownDiskImage = errors.New("unknown disk image")
	ErrUnknownMachineID = errors.New("unknown machine id")
	ErrUnknownRegion    = errors.New("unknown region")
)

Functions

This section is empty.

Types

type Hetzner

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

func NewHetzner

func NewHetzner(token string) *Hetzner

func (*Hetzner) BuildServerOptions

func (h *Hetzner) BuildServerOptions(ctx context.Context, opts *options.Options) (*hcloud.ServerCreateOpts, *string, []byte, error)

func (*Hetzner) Create

func (h *Hetzner) Create(ctx context.Context, req *hcloud.ServerCreateOpts, diskSize int, publicKey string, privateKeyFile []byte) error

func (*Hetzner) Delete

func (h *Hetzner) Delete(ctx context.Context, name string) error

func (*Hetzner) GetByName

func (h *Hetzner) GetByName(ctx context.Context, name string) (*hcloud.Server, error)

func (*Hetzner) Init

func (h *Hetzner) Init(ctx context.Context) error

func (*Hetzner) Status

func (h *Hetzner) Status(ctx context.Context, name string) (client.Status, error)

func (*Hetzner) Stop

func (h *Hetzner) Stop(ctx context.Context, name string) error

Jump to

Keyboard shortcuts

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