Documentation ¶
Index ¶
- type DiskConfig
- type Disks
- type GCPClient
- func (g GCPClient) ConnectToInstanceSerialPort(instance, zone string) error
- func (g GCPClient) CreateImage(name, storageURL, family string, uefi, replace bool) error
- func (g GCPClient) CreateInstance(name, image, zone, machineType string, disks Disks, data *string, ...) error
- func (g GCPClient) DeleteFirewallAllowRule(ruleName string) error
- func (g GCPClient) DeleteImage(name string) error
- func (g GCPClient) DeleteInstance(instance, zone string, wait bool) error
- func (g GCPClient) GetInstanceNatIP(instance, zone string) (string, error)
- func (g GCPClient) GetInstanceSerialOutput(instance, zone string, follow bool) error
- func (g GCPClient) ListImages() ([]string, error)
- func (g GCPClient) RemoveFile(file, bucketName string) error
- func (g GCPClient) SetFirewallAllowRule(ruleName string, priority int64, sourceRanges []string) error
- func (g GCPClient) UploadFile(src, dst, bucketName string, public bool) error
- type PublishedPort
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiskConfig ¶
DiskConfig is the config for a disk
type Disks ¶
type Disks []DiskConfig
Disks is the type for a list of DiskConfig
type GCPClient ¶
type GCPClient struct {
// contains filtered or unexported fields
}
GCPClient contains state required for communication with GCP
func NewGCPClient ¶
NewGCPClient creates a new GCP client
func (GCPClient) ConnectToInstanceSerialPort ¶
ConnectToInstanceSerialPort uses SSH to connect to the serial port of the instance
func (GCPClient) CreateImage ¶
CreateImage creates a GCP image using the source from Google Storage
func (GCPClient) CreateInstance ¶
func (g GCPClient) CreateInstance(name, image, zone, machineType string, disks Disks, data *string, vtpm, replace bool) error
CreateInstance creates and starts an instance on GCP
func (GCPClient) DeleteFirewallAllowRule ¶
DeleteFirewallAllowRule runs gcloud compute firewall-rules delete ruleName
func (GCPClient) DeleteImage ¶
DeleteImage deletes and image
func (GCPClient) DeleteInstance ¶
DeleteInstance removes an instance
func (GCPClient) GetInstanceNatIP ¶
GetInstanceNatIP returns NatIP of an instance
func (GCPClient) GetInstanceSerialOutput ¶
GetInstanceSerialOutput streams the serial output of an instance follow log if follow set to true
func (GCPClient) ListImages ¶
ListImages list all uploaded images
func (GCPClient) RemoveFile ¶
RemoveFile removes a file from Google Storage
type PublishedPort ¶
PublishedPort is used by some backends to expose a VMs port on the host
func NewPublishedPort ¶
func NewPublishedPort(publish string) (PublishedPort, error)
NewPublishedPort parses a string of the form <host>:<guest>[/<tcp|udp>] and returns a PublishedPort structure