vultr

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewManager

func NewManager(providerAPIToken string) (core.VMManager, error)

NewManager creates a manage object & inits it

Types

type Manager

type Manager struct {
	APIToken string
	// contains filtered or unexported fields
}

Manager controls access to AWS

func (*Manager) CreateVM

func (m *Manager) CreateVM(name string, image string, size string, region string, sshKey core.SSHKey) (core.VMInfo, error)

CreateVM will create a new VM

func (*Manager) DeleteVM

func (m *Manager) DeleteVM(ID string) error

DeleteVM will delete a given VM

func (*Manager) FindAuthToken added in v0.2.10

func (m *Manager) FindAuthToken() string

GetAuthToken will check common place for vultr api key

func (*Manager) GetVMInfo

func (m *Manager) GetVMInfo(vmID string) (vmInfo core.VMInfo, err error)

GetVMInfo will get details of a VM

func (*Manager) IsSSHKeyUploaded

func (m *Manager) IsSSHKeyUploaded(desiredSSHKey core.SSHKey) (keyID string, err error)

IsSSHKeyUploaded checks if ssh key already uploaded to Vultr

func (*Manager) ListVMs

func (m *Manager) ListVMs() (vmInfo []core.VMInfo, err error)

ListVMs will return a list of all VMs created by eezhee

func (*Manager) SelectClosestRegion

func (m *Manager) SelectClosestRegion() (closestRegion string, err error)

SelectClosestRegion will ping all regions and return the ID of the closest

func (*Manager) UploadSSHKey added in v0.2.10

func (m *Manager) UploadSSHKey(keyName string, sshKey core.SSHKey) (keyID string, err error)

UploadSSHKey will upload an SSH key to the cloud provider

type Plan

type Plan struct {
	ID        string
	Name      string
	VCPUs     int
	RAM       int
	Disk      int
	Bandwidth int //in GB
	Price     float32
}

Plan details about each VM plan

Jump to

Keyboard shortcuts

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