cloudproviders

package
v0.0.0-...-ba35e2a Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package cloudproviders provides utilities to detect the cloud provider.

Index

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

func GetCloudProviderNTPHosts(ctx context.Context) []string

GetCloudProviderNTPHosts detects the cloud provider where the agent is running in order and returns its NTP host name.

func GetHostAliases

func GetHostAliases(ctx context.Context) []string

GetHostAliases returns the hostname aliases from different provider

func GetHostID

func GetHostID(ctx context.Context, cloudProviderName string) string

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

func GetNetworkID(ctx context.Context) (string, error)

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

func GetPublicIPv4(ctx context.Context) (string, error)

GetPublicIPv4 returns the public IPv4 from different providers

func GetSource

func GetSource(cloudProviderName string) string

GetSource returns the source used to pull information from the current cloud provider. For now only EC2 is supported. Example of sources for EC2: "IMDSv1", "IMDSv2", "DMI", ...

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.

Jump to

Keyboard shortcuts

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