Beethoven.Az (Beethoven v0.3.7)

Azure Platform awareness for the node. If the app is not in Azure, genserver will response :no_azure to all calls.

Functions

  • get_state/0 Returns the entire state of the GenServer.
  • get_az_subnet/0 Returns the subnet this VM resides in. Pulls data from cache.
  • get_az_region/0 Returns the region this VM resides in. Pulls data from cache.

Summary

Functions

Returns a specification to start this module under a supervisor.

Retrieves the Azure region from IMDS data.

Retrieves the VM's networking config from IMDS data.

Retrieves the Azure region from IMDS data.

Entry point for Supervisors. Links calling PID this this child pid.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_az_region()

@spec get_az_region() :: atom() | :no_azure

Retrieves the Azure region from IMDS data.

get_az_subnet()

@spec get_az_subnet() ::
  {{integer(), integer(), integer(), integer()}, integer()} | :no_azure

Retrieves the VM's networking config from IMDS data.

RETURNS ONLY PRIMARY INTERFACE FOR VM

get_state()

@spec get_state() :: map() | :no_azure

Retrieves the Azure region from IMDS data.

start_link(args)

@spec start_link(any()) :: {:ok, pid()}

Entry point for Supervisors. Links calling PID this this child pid.