instancemeta

package
v0.0.0-...-f37bb2f Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 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 InstanceMetadata

type InstanceMetadata struct {
	CompartmentOCID string `json:"compartmentId"`
	Region          string `json:"region"`
}

InstanceMetadata holds the subset of the instance metadata retrieved from the local OCI instance metadata API endpoint. https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/gettingmetadata.htm

type Interface

type Interface interface {
	Get() (*InstanceMetadata, error)
}

Interface defines how consumers access OCI instance metadata.

func New

func New() Interface

New returns the instance metadata for the host on which the code is being executed.

func NewMock

func NewMock(metadata *InstanceMetadata) Interface

NewMock returns a new mock OCI instance metadata getter.

Jump to

Keyboard shortcuts

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