cloudfunctions

package
v0.0.0-...-e29ad75 Latest Latest
Warning

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

Go to latest
Published: May 27, 2019 License: MIT Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

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