gcp

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GCUserDataEndpoint is the local metadata endpoint inside of DO.
	GCUserDataEndpoint = "http://metadata.google.internal/computeMetadata/v1/instance/attributes/user-data"
	// GCExternalIPEndpoint displays all external addresses associated with the instance.
	GCExternalIPEndpoint = "http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/?recursive=true"
)

Ref: https://cloud.google.com/compute/docs/storing-retrieving-metadata ex, curl -H "Metadata-Flavor: Google" 'http://169.254.169.254/computeMetadata/v1/instance/network-interfaces/?recursive=true'

Variables

This section is empty.

Functions

This section is empty.

Types

type GCP

type GCP struct{}

GCP is the concrete type that implements the platform.Platform interface.

func (*GCP) Configuration

func (g *GCP) Configuration(ctx context.Context) ([]byte, error)

Configuration implements the platform.Platform interface.

func (*GCP) ExternalIPs

func (g *GCP) ExternalIPs(ctx context.Context) (addrs []net.IP, err error)

ExternalIPs implements the runtime.Platform interface.

func (*GCP) Hostname

func (g *GCP) Hostname(context.Context) (hostname []byte, err error)

Hostname implements the platform.Platform interface.

func (*GCP) KernelArgs

func (g *GCP) KernelArgs() procfs.Parameters

KernelArgs implements the runtime.Platform interface.

func (*GCP) Mode

func (g *GCP) Mode() runtime.Mode

Mode implements the platform.Platform interface.

func (*GCP) Name

func (g *GCP) Name() string

Name implements the platform.Platform interface.

Jump to

Keyboard shortcuts

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