metadata

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: Apache-2.0 Imports: 4 Imported by: 20

Documentation

Overview

Package iam provides interfaces and wrappers around the google iam client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// InstanceAttributeValue returns the value of the provided VM instance attribute.
	// See https://godoc.org/cloud.google.com/compute/metadata#Client.ProjectID
	InstanceAttributeValue(attr string) (string, error)

	// ProjectID returns the current instance's project ID string.
	// See https://godoc.org/cloud.google.com/compute/metadata#Client.InstanceAttributeValue
	ProjectID() (string, error)

	// OnGCE reports whether this process is running on Google Compute Engine.
	// See https://godoc.org/cloud.google.com/compute/metadata#OnGCE
	OnGCE() bool
}

Client matches the interface exposed by metadata.Client

func NewDefaultMetadataClient

func NewDefaultMetadataClient() Client

func NewMetadataClient

func NewMetadataClient(httpClient *http.Client) Client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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