Documentation ¶
Index ¶
- func ConfigGoogleClient(value GoogleComputeClient) func(*Client) error
- func ConfigProjectName(value string) func(*Client) error
- func ConfigTimeout(value time.Duration) func(*Client) error
- func ConfigZoneName(value string) func(*Client) error
- type Client
- func (s *Client) CreateVM(instance compute.Instance) error
- func (s *Client) DeleteVM(instanceName string) error
- func (s *Client) GetVMInfo(filter Filter) (*compute.Instance, error)
- func (s *Client) StopVM(instanceName string) error
- func (s *Client) WaitForStatus(vmName string, desiredStatus string) error
- type ClientAPI
- type Filter
- type GoogleComputeClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigGoogleClient ¶
func ConfigGoogleClient(value GoogleComputeClient) func(*Client) error
func ConfigProjectName ¶
func ConfigZoneName ¶
Types ¶
type Client ¶ added in v0.1.2
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetVMInfo ¶ added in v0.1.2
GetVMInfo - gets the information on the first VM to match the given filter argument currently filter will only do a regex on teh tag||name regex fields against the List's result set
type GoogleComputeClient ¶
type GoogleComputeClient interface { List(project string, zone string) (*compute.InstanceList, error) Delete(project string, zone string, instanceName string) (*compute.Operation, error) Insert(project string, zone string, instance *compute.Instance) (*compute.Operation, error) Stop(project string, zone string, instanceName string) (*compute.Operation, error) }
func NewDefaultGoogleComputeClient ¶
func NewDefaultGoogleComputeClient(credpath string) (GoogleComputeClient, error)
NewDefaultGoogleComputeClient -- builds a gcp client which connects to your gcp using `GOOGLE_APPLICATION_CREDENTIALS`
Click to show internal directories.
Click to hide internal directories.