metadataserver

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package metadataserver performs requests to the metadata server of a GCE instance.

Interfacing with the metadata server is necessary to obtain project-level and per-instance metadata for use by the gcagent. Requests to the metadata server will also be used as a logging mechanism for gcagent usage metrics.

Index

Constants

View Source
const ImageUnknown = "unknown"

ImageUnknown is the default value if image information cannot be obtained from the metadata server.

Variables

This section is empty.

Functions

func CloudPropertiesWithRetry

func CloudPropertiesWithRetry(bo backoff.BackOff) *instancepb.CloudProperties

CloudPropertiesWithRetry fetches information from the GCE metadata server with a retry mechanism.

If there are any persistent errors in fetching this information, then the error will be logged and the return value will be nil.

func FetchCloudProperties

func FetchCloudProperties() *instancepb.CloudProperties

FetchCloudProperties retrieves the cloud properties using a backoff policy.

func FetchGCEMaintenanceEvent

func FetchGCEMaintenanceEvent() (string, error)

FetchGCEMaintenanceEvent retrieves information about pending host maintenance events.

Types

This section is empty.

Jump to

Keyboard shortcuts

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