gce

package
v0.0.0-...-55c649e Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Overview

Package gce contains high-level functionality for manipulating GCE resources.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTimeout indicates that an operation timed out.
	ErrTimeout = errors.New("operation timed out")

	// ErrImageNotFound indicates that a GCE image could not be found
	ErrImageNotFound = errors.New("image not found")
)

Functions

func DeprecateInFamily

func DeprecateInFamily(ctx context.Context, svc *compute.Service, newImage *config.Image, ttl int) error

DeprecateInFamily deprecates all of the old images in an image family. Allows for assigning TTLs (in seconds) to deprecated images.

func ImageExists

func ImageExists(svc *compute.Service, project, name string) (bool, error)

ImageExists checks to see if the given image exists in the given project.

func ResolveMilestone

func ResolveMilestone(ctx context.Context, svc *compute.Service, milestone int) (string, error)

ResolveMilestone gets the name of the latest COS image on the given milestone. This resolution is done by looking at the image names in cos-cloud.

Types

This section is empty.

Jump to

Keyboard shortcuts

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