config

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	DigitalOceanAPIKey string
	CloudFlareAPIKey   string
	LinodeAPIKey       string
	VultrAPIKey        string
	DefaultCloud       string // required if we have more than one api key
	// contains filtered or unexported fields
}

AppConfig has details of how to deploy the cluster note: all these fields are optional

func NewAppConfig

func NewAppConfig() *AppConfig

NewAppConfig will create a new deploy file object

func (*AppConfig) GetDefaultCloud added in v0.2.7

func (a *AppConfig) GetDefaultCloud() string

GetDefaultCloud returns which cloud has been configured if there are multiple, will default to DigitalOcean

func (*AppConfig) Load

func (a *AppConfig) Load() error

Load a given deploy state file

func (*AppConfig) Save

func (a *AppConfig) Save() error

Save details of a deploy to the deploy-state file

type DeployConfig

type DeployConfig struct {
	Cloud        string // which cloud cluster was create in
	Region       string // where to deploy the cluster
	Name         string // what to call the cluster
	K3sVersion   string // version of k3s to use. ie: latest, stable, 1.18, 1.18.3
	Size         string // VM size
	SSHPublicKey string // which ssh key to allow to acces the VM(s)
	// contains filtered or unexported fields
}

DeployConfig has details of how to deploy the cluster note: all these fields are optional

func NewDeployConfig

func NewDeployConfig() *DeployConfig

NewDeployConfig will create a new deploy file object

func (*DeployConfig) Delete

func (d *DeployConfig) Delete() error

Delete the deploy state file

func (*DeployConfig) FileExists

func (d *DeployConfig) FileExists() bool

FileExists checks if a deploy config file exists in current directory

func (*DeployConfig) Load

func (d *DeployConfig) Load() error

Load a given deploy state file

func (*DeployConfig) Save

func (d *DeployConfig) Save() error

Save details of a deploy to the deploy-state file

type DeployState

type DeployState struct {
	Cloud        string // which cloud cluster was create in
	ID           string // ID of the VM cluster is on
	Name         string // name of the cluster
	Region       string // region cluster deployed to
	Size         string // VM size
	IP           string // public IPv4 address
	SSHPublicKey string // which ssh key authorited to access VM
	K3sVersion   string // version of k3s installed
	// contains filtered or unexported fields
}

DeployState has details of the deploy-state file for a cluster

func NewDeployState

func NewDeployState() (f *DeployState)

NewDeployState will create a new deploy file object

func (*DeployState) Delete

func (s *DeployState) Delete() error

Delete the deploy state file

func (*DeployState) FileExists

func (s *DeployState) FileExists() bool

FileExists checks if a deploy config file exists in current directory

func (*DeployState) Load

func (s *DeployState) Load() error

Load a given deploy state file

func (*DeployState) Save

func (s *DeployState) Save() error

Save details of a deploy to the deploy-state file

Jump to

Keyboard shortcuts

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