gce

package
v0.0.0-...-60cae77 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCEClient

type GCEClient struct {
	Client *compute.Service
}

Client for a Compute Engine Resource.

func NewGCEClient

func NewGCEClient() *GCEClient

func (*GCEClient) Auth

func (client *GCEClient) Auth(ctx context.Context, opts ...option.ClientOption) error

Auth authenticates the client to access Compute Engine resources. See https://pkg.go.dev/google.golang.org/api/option?tab=doc for more information about passing options.

func (*GCEClient) DeleteResource

func (client *GCEClient) DeleteResource(projectID string, resource *resources.Resource) error

DeleteResource deletes the specificed Compute Engine instance.

func (*GCEClient) GetResources

func (client *GCEClient) GetResources(projectID string, config *reaperconfig.ResourceConfig) ([]*resources.Resource, error)

GetResources gets the Compute Engine instances that pass the filters defined in the ResourceConfig

Jump to

Keyboard shortcuts

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