ice

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2016 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides an interface to the iCE Server REST API.

func NewClient

func NewClient(endpoint string) *Client

NewClient creates an iCE client for the given endpoint URL.

func (*Client) MyIP

func (i *Client) MyIP(ctx context.Context) (net.IP, error)

MyIP returns the IP of the running machine as seen from the iCE server.

func (*Client) StoreInstance

func (i *Client) StoreInstance(ctx context.Context, inst Instance) (string, error)

StoreInstance submits an iCE instance to the iCE server.

type Instance

type Instance struct {
	ID                       string            `json:"id,omitempty"`
	SessionID                string            `json:"session_id"`
	Networks                 []InstanceNetwork `json:"networks"`
	PublicIPAddr             net.IP            `json:"public_ip_addr"`
	PublicReverseDNS         string            `json:"public_reverse_dns"`
	SSHAuthorizedFingerprint string            `json:"ssh_authorized_fingerprint"`
	Tags                     map[string]string `json:"tags"`
}

Instance describes an iCE instance.

type InstanceNetwork

type InstanceNetwork struct {
	IPAddr          net.IP `json:"addr"`
	Iface           string `json:"iface"`
	BroadcastIPAddr net.IP `json:"bcast_addr"`
}

InstanceNetwork is a part of the Instance type. It describes a network entry.

Jump to

Keyboard shortcuts

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