Documentation ¶
Overview ¶
Package cloudproviders provides utilities to detect the cloud provider.
Index ¶
- func DetectCloudProvider(ctx context.Context, collectAccountID bool, l logcomp.Component) (string, string)
- func GetCloudProviderNTPHosts(ctx context.Context) []string
- func GetHostAliases(ctx context.Context) []string
- func GetHostID(ctx context.Context, cloudProviderName string) string
- func GetNetworkID(ctx context.Context) (string, error)
- func GetPublicIPv4(ctx context.Context) (string, error)
- func GetSource(cloudProviderName string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectCloudProvider ¶
func DetectCloudProvider(ctx context.Context, collectAccountID bool, l logcomp.Component) (string, string)
DetectCloudProvider detects the cloud provider where the agent is running in order:
func GetCloudProviderNTPHosts ¶
GetCloudProviderNTPHosts detects the cloud provider where the agent is running in order and returns its NTP host name.
func GetHostAliases ¶
GetHostAliases returns the hostname aliases from different provider
func GetHostID ¶
GetHostID returns the ID for a cloud provider for the current host. The host ID is unique to the cloud provider and is different from the hostname. For now only EC2 is supported.
func GetNetworkID ¶
GetNetworkID retrieves the network_id which can be used to improve network connection resolution. This can be configured or detected. The following sources will be queried: * configuration * GCE * EC2
func GetPublicIPv4 ¶
GetPublicIPv4 returns the public IPv4 from different providers
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package alibaba provides utilities to detect the Alibaba cloud provider.
|
Package alibaba provides utilities to detect the Alibaba cloud provider. |
Package azure provides utilities to detect Azure cloud provider.
|
Package azure provides utilities to detect Azure cloud provider. |
Package gce provides utilities to detect gce cloud provider.
|
Package gce provides utilities to detect gce cloud provider. |
Package ibm provides utilities to detect ibm cloud provider.
|
Package ibm provides utilities to detect ibm cloud provider. |
Package kubernetes provides utilities to detect cloud provider from kubernetes.
|
Package kubernetes provides utilities to detect cloud provider from kubernetes. |
Package oracle provides utilities to detect oracle cloud provider.
|
Package oracle provides utilities to detect oracle cloud provider. |
Package tencent provides utilities to detect tencent cloud provider.
|
Package tencent provides utilities to detect tencent cloud provider. |