gcp

package
v0.0.0-...-e8d4eb1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0, MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureViaSsh

func ConfigureViaSsh(settings *config.Settings, ni *NodeInfo, client *ssh.Client) error

ConfigureViaSsh invokes the specified command string via ssh to perform additional configuration of the target node. Significant additional featurism is possible.

func DescribeInstance

func DescribeInstance(settings *config.Settings, name string) error

DescribeInstance describes instance |name| with a sump of its JSON description.

func EndSession

func EndSession(settings *config.Settings, instance string) error

TODO(rjk): Consider making this block until the instance is actually gone.

func GetMetadataKeys

func GetMetadataKeys(settings *config.Settings, name string) ([]string, error)

func GetNodeIp

func GetNodeIp(settings *config.Settings, wantednode string) (string, error)

func InstallViaSsh

func InstallViaSsh(settings *config.Settings, ni *NodeInfo, client *ssh.Client) error

func List

func List(settings *config.Settings) error

func ListImages

func ListImages(settings *config.Settings) error

ListImages lists available and default selected images for each image family currently in use.

func MakeSshClientConfig

func MakeSshClientConfig(settings *config.Settings) (*ssh.ClientConfig, error)

MakeSshClientConfig populates an ssh.ClientConfig for reuse by each connection attempt.

func NewAuthenticatedClient

func NewAuthenticatedClient(scopes []string) (context.Context, *http.Client, error)

func NewSshProxiedTransport

func NewSshProxiedTransport(client *ssh.Client) http.RoundTripper

func NewTransport

func NewTransport(trans http.RoundTripper) http.RoundTripper

func PrintMetadata

func PrintMetadata() error

func ShowMetadata

func ShowMetadata(settings *config.Settings, configName string) error

ShowMetadata will display the metadata object.

func TarGZTools

func TarGZTools(w io.Writer) error

func WaitForSsh

func WaitForSsh(settings *config.Settings, ni *NodeInfo) (*ssh.Client, error)

WaitForSsh waits for a ssh server to be up on the newly created node. Run this after making the node.

Types

type NodeInfo

type NodeInfo struct {
	Name       string
	ConfigName string
	Addr       string
	Token      string
}

NodeInfo holds all the state necessary for subsequent utilities to be able to connect to the node.

func MakeNode

func MakeNode(settings *config.Settings, configName, instanceName string) (*NodeInfo, error)

func (*NodeInfo) Ssh

func (ni *NodeInfo) Ssh() string

Ssh returns the address for an SSH connection to the node.

type Paths

type Paths struct {
	From    string
	To      string
	Pattern []string
}

type VersionTuple

type VersionTuple [4]int

Jump to

Keyboard shortcuts

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