metadata

package
v0.14.51 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ProjectID() (string, error)
	Zone() (string, error)
}

Client uses HTTP requests to query the metadata service.

type GCPMetadata

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

GCPMetadata contains metadata about a GCP VM.

func NewGCPMetadata

func NewGCPMetadata(c Client, hostname string) (*GCPMetadata, error)

NewGCPMetadata returns a new instance of GCPMetadata.

func (*GCPMetadata) Backend

func (m *GCPMetadata) Backend() string

Backend in GCE.

func (*GCPMetadata) Group

func (m *GCPMetadata) Group() string

Group is the the URI referencing the instance group.

func (*GCPMetadata) Project

func (m *GCPMetadata) Project() string

Project ID (e.g., mlab-sandbox).

func (*GCPMetadata) Region

func (m *GCPMetadata) Region() string

Region derived from zone (e.g., us-west1).

Jump to

Keyboard shortcuts

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