Documentation
¶
Overview ¶
Package providers contains machine/cloud providers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector interface {
// Name returns the name of the provider.
Name() string
// Provider returns a non-empty string and no error,
// if a provider is successfully detected.
Provider(context.Context) (string, error)
// PublicIPv4 returns a non-empty string and no error,
// if a public IPv4 is successfully detected.
PublicIPv4(context.Context) (string, error)
// VMEnvironment returns a non-empty string and no error,
// if a VM environment is successfully detected.
// e.g., "azEnvironment" as "AZUREPUBLICCLOUD" for Azure.
VMEnvironment(context.Context) (string, error)
// InstanceID returns an instance id generated by provider.
InstanceID(ctx context.Context) (string, error)
}
Detector defines a provider detector interface.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package all provides a list of known providers.
|
Package all provides a list of known providers. |
|
Package aws implements "AWS" provider and helpers.
|
Package aws implements "AWS" provider and helpers. |
|
imds
Package imds provides functions for interacting with the AWS Instance Metadata Service.
|
Package imds provides functions for interacting with the AWS Instance Metadata Service. |
|
Package azure implements "azure" provider and helpers.
|
Package azure implements "azure" provider and helpers. |
|
imds
Package imds provides functions for interacting with the Azure Instance Metadata Service.
|
Package imds provides functions for interacting with the Azure Instance Metadata Service. |
|
Package gcp implements Google Cloud Platform (GCP) provider and helpers.
|
Package gcp implements Google Cloud Platform (GCP) provider and helpers. |
|
imds
Package imds provides functions for interacting with the Google Cloud Platform Instance Metadata Service.
|
Package imds provides functions for interacting with the Google Cloud Platform Instance Metadata Service. |
Click to show internal directories.
Click to hide internal directories.