IMDS. Discovery
(imds v1.0.0)
Copy Markdown
The provider detection of IMDS.detect/1.
The module probes the providers of IMDS.Providers.all/0 in order. The first
:ok answer wins. The failed probes of the other providers are not errors:
they only mean that the instance is not of that provider.
The environment variable INSTANCE_METADATA_PROVIDER and the :provider
option skip the probe. A value that names no provider is an error.
Summary
Functions
Return the identifier of the provider of the current instance.
Return the module of the provider of the current instance.
Functions
@spec detect(keyword()) :: {:ok, IMDS.Provider.provider()} | {:error, IMDS.Provider.reason()}
Return the identifier of the provider of the current instance.
@spec provider(keyword()) :: {:ok, module()} | {:error, IMDS.Provider.reason()}
Return the module of the provider of the current instance.