packet

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Ubuntu1604LTS OS image
	Ubuntu1604LTS = OS("ubuntu_16_04_image")
	// CentOS7 OS image
	CentOS7 = OS("centos_7_image")
	// USEast region
	USEast = Region("ewr1")
	// USWest region
	USWest = Region("sjc1")
	// EUWest region
	EUWest = Region("ams1")
)

Variables

This section is empty.

Functions

func Cmd

func Cmd() *cobra.Command

Cmd returns the command for managing Packet infrastructure

Types

type Client

type Client struct {
	APIKey    string
	ProjectID string
	SSHKey    string
	// contains filtered or unexported fields
}

Client for managing infrastructure on Packet

func (Client) CreateNode

func (c Client) CreateNode(hostname string, os OS, region Region) (string, error)

CreateNode creates a node in packet with the given hostname and OS

func (Client) DeleteNode

func (c Client) DeleteNode(deviceID string) error

DeleteNode deletes the node that matches the given ID

func (Client) GetNode

func (c Client) GetNode(deviceID string) (*plan.Node, error)

func (Client) GetSSHAccessibleNode

func (c Client) GetSSHAccessibleNode(deviceID string, timeout time.Duration, sshKey string) (*plan.Node, error)

GetSSHAccessibleNode blocks until the node is accessible via SSH and returns the node's information.

func (Client) ListNodes

func (c Client) ListNodes() ([]plan.Node, error)

type OS

type OS string

OS is an operating system supported on Packet

type Region

type Region string

Region where nodes are deployed

Jump to

Keyboard shortcuts

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