packet

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// Ubuntu1604LTS OS image
	Ubuntu1604LTS = OS("ubuntu_16_04_image")
	// CentOS7 OS image
	CentOS7 = OS("centos_7_image")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for managing infrastructure on Packet

func (Client) BlockUntilNodeAccessible

func (c Client) BlockUntilNodeAccessible(deviceID string, timeout time.Duration, sshKey, sshUser string) error

BlockUntilNodeAccessible blocks until the given node is accessible, or the timeout is reached.

func (Client) CreateNode

func (c Client) CreateNode(hostname string, os OS, _ map[string]string) (*Node, 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) (*Node, error)

GetNode returns the node that matches the given ID

type Node

type Node struct {
	ID          string
	Host        string
	PublicIPv4  string
	PrivateIPv4 string
	SSHUser     string
}

Node is a Packet.net node

type OS

type OS string

OS is an operating system supported on Packet

Jump to

Keyboard shortcuts

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