metadata

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 6 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 {
	CompartmentID       string `json:"compartmentId"`
	Region              string `json:"region"`
	CanonicalRegionName string `json:"canonicalRegionName"`
}

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 NewErrorMock

func NewErrorMock() Interface

NewErrorMock returns a new mock OCI instance metadata getter that returns an error on Get().

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