provider

package
v0.0.0-...-61e8f65 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAWSInstance = "t3.micro"
View Source
const DefaultDigitalOceanDroplet = "s-1vcpu-1gb"
View Source
const MaxNameLength = 32

Variables

View Source
var (
	ErrEmptyName = errors.New("node name cannot be empty")

	ErrNameTooLong = errors.New("name exceeds max name length")

	ErrMissingCredential = errors.New("missing cloud provider credential for deployment")

	ErrUnknownProvider = errors.New("unknown cloud provider")

	ErrInstanceTypeNotAvailable = errors.New("selected instance type is not available")

	ErrRegionNotAvailable = errors.New("selected region is not available")

	ErrNoAvailableRegion = errors.New("cannot find any available region with given account")

	ErrInsufficientPermission = errors.New("insufficient permissions")

	ErrInvalidNodeNameForGCP = errors.New("for google cloud, name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen")
)
View Source
var (
	NameAws = "aws"
	NameDo  = "do"
	NameGcp = "gcp"
)
View Source
var DarknodeService = `` /* 437-byte string literal not displayed */
View Source
var DarknodeUpdaterService = `` /* 407-byte string literal not displayed */

Functions

func NodeSudoUsername

func NodeSudoUsername(name string) (string, error)

NodeSudoUsername returns the sudo username of the instance with given name.

func ParseNetwork

func ParseNetwork(ctx *cli.Context) (multichain.Network, error)

ParseNetwork parses the network from input arguments.

Types

type Provider

type Provider interface {

	// Name of the Provider
	Name() string

	// Deploy darknode with from this provider
	Deploy(ctx *cli.Context) error
}

func NewAWS

func NewAWS(ctx *cli.Context) (Provider, error)

NewAWS creates an AWS provider.

func NewDo

func NewDo(ctx *cli.Context) (Provider, error)

NewDo creates a Digital Ocean provider.

func ParseProvider

func ParseProvider(ctx *cli.Context) (Provider, error)

ParseProvider parses the cloud provider from input arguments.

Jump to

Keyboard shortcuts

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