Specs
primary_region() :: String.t()
Return the configured primary region. Reads and requires an ENV setting for
PRIMARY_REGION
. If not set, it returns "local"
.
Functions and features to help Elixir applications more easily take advantage of the features that Fly.io provides.
Return if the app instance is running in the primary region or not. Boolean result.
Return the configured current region. Reads the FLY_REGION
ENV setting
available when deployed on the Fly.io platform. When running on a different
platform, that ENV value will not be set. Setting the MY_REGION
ENV value
instructs the node how to identify what "region" it is in. If not set, it
returns "local"
.
Return the configured primary region. Reads and requires an ENV setting for
PRIMARY_REGION
. If not set, it returns "local"
.
Execute the MFA on a node in the primary region.
Return if the app instance is running in the primary region or not. Boolean result.
my_region() :: String.t()
Return the configured current region. Reads the FLY_REGION
ENV setting
available when deployed on the Fly.io platform. When running on a different
platform, that ENV value will not be set. Setting the MY_REGION
ENV value
instructs the node how to identify what "region" it is in. If not set, it
returns "local"
.
The value itself is not important. If the value matches the value for the
PRIMARY_REGION
then it behaves as though it is the primary.
primary_region() :: String.t()
Return the configured primary region. Reads and requires an ENV setting for
PRIMARY_REGION
. If not set, it returns "local"
.
Execute the MFA on a node in the primary region.