providers

package
v0.0.0-...-462c60f Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//go:embed install.sh.tmpl
	InitData                string
	ProviderFactoryRegistry = make(map[string]ProviderFactory)
)

Functions

func Register

func Register(name string, providerFactory ProviderFactory)

Types

type InstanceStatus

type InstanceStatus int
const (
	// No running instance in this region
	InstanceStatusMissing InstanceStatus = iota
	// Running means an instance exists - it could be starting/stopping/running
	InstanceStatusRunning
)

type Provider

type Provider interface {
	CreateInstance(ctx context.Context, region string, key tailscale.Key) (string, error)
	GetInstanceStatus(ctx context.Context, region string) (InstanceStatus, error)
	ListRegions(ctx context.Context) ([]Region, error)
	Hostname(region string) string
}

type ProviderFactory

type ProviderFactory func(ctx context.Context, sshKey string) (Provider, error)

type Region

type Region struct {
	Code     string
	LongName string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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