gce

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const BackendName = "gce"

Variables

This section is empty.

Functions

func NewBackend

func NewBackend(ctx context.Context, m configmap.Mapper) (backend.Backend, error)

NewBackend constructs an aws Backend

func ParseURLPath

func ParseURLPath(pattern string, rawURL string) map[string]string

ParseURLPath path can contain variables denoted by curly braces, such as {id}. These variables will be parsed and stored in map.

Example:

pattern	= /compute/v1/projects/{projectID}/zones/{zoneID}/instances/{instanceName}
url		= /compute/v1/projects/bringg-test/zones/us-east1-b/instances/integration-jenkins-slave-xpx5

map = { "instanceName": "integration-jenkins-slave-xpx5", "projectID": "bringg-test", "zoneID": "us-east1-b" }

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

func (*Backend) CurrentSize

func (b *Backend) CurrentSize() (int64, error)

func (*Backend) Instances

func (b *Backend) Instances() (backend.Instances, error)

func (*Backend) Name

func (b *Backend) Name() string

func (*Backend) Resize

func (b *Backend) Resize(size int64) error

func (*Backend) Terminate

func (b *Backend) Terminate(instances backend.Instances) error

type Options

type Options struct {
	Project                  string `config:"project" validate:"required"`
	Region                   string `config:"region" validate:"required"`
	InstanceGroupManagerName string `config:"instance_group_manager" validate:"required"`
}

Options defines the configuration for this backend

func (*Options) Name

func (o *Options) Name() string

Jump to

Keyboard shortcuts

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