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.
Click to show internal directories.
Click to hide internal directories.