Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InstanceName = ""
View Source
var ProjectID = ""
View Source
var Region = ""
View Source
var Zone = ""
Functions ¶
func GetInstance ¶
func GetInstance(computeService *compute.Service) (*compute.Instance, error)
GetInstance passes in the instance name supplied and retrieves it. An error indicates an instance that was never created. A non-nil error indicates an instance is present whether in the RUNNING or TERMINATED state.
func InitComputeService ¶
func InitComputeService() (*compute.Service, error)
InitComputeService obtains the compute service that allows us to use the compute API
func PollInstance ¶
func PollInstance(w http.ResponseWriter, r *http.Request)
PollInstance will use the Golang GCP API to deploy poll a given instance. If the instance is stopped or terminated, it will restart the instance
func StartInstance ¶
func StartInstance(computeService *compute.Service) (*compute.Operation, error)
StartInstance begins an instance with the given name
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.