gcloud

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package gcloud contains helpers for calling `gcloud` tool in PATH.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, cmd []string, cwd string, env environ.Env, dryRun bool) error

Run executes arbitrary `gcloud [cmd]`.

Types

type Modules

type Modules map[string]Versions

Modules is a map "module name -> its versions".

func List

func List(ctx context.Context, appID, module string) (Modules, error)

List lists deployed versions of an app.

Wraps `gcloud app versions list` command. If `module` is given, limits the output only to that module, otherwise lists all modules.

type Version

type Version struct {
	Name             string    // version name (matches the key in Versions map)
	LastDeployedTime time.Time // when it was deployed
	TrafficSplit     float64   // 0.0 - 1.0
}

Version are attributes a version of some module.

type Versions

type Versions map[string]Version

Versions is a map from version name to its attributes.

Jump to

Keyboard shortcuts

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