Astarte.Flow.Config (astarte_flow v0.1.0)

Link to this section Summary

Functions

Name of the Kubernetes instance of astarte which Flow will connect to

Name of the Kubernetes instance of astarte which Flow will connect to

Returns the default amqp connection parameters

Default RabbitMQ connection host

Default RabbitMQ connection host

Default RabbitMQ connection password

Default RabbitMQ connection password

Default RabbitMQ connection port

Default RabbitMQ connection port

Specifies the certificates of the root Certificate Authorities to be trusted. When not specified, the bundled cURL certificate bundle will be used.

Specifies the certificates of the root Certificate Authorities to be trusted. When not specified, the bundled cURL certificate bundle will be used.

Specify the hostname to be used in TLS Server Name Indication extension. If not specified, the amqp host will be used. This value is used only if Server Name Indication is enabled.

Specify the hostname to be used in TLS Server Name Indication extension. If not specified, the amqp host will be used. This value is used only if Server Name Indication is enabled.

Disable Server Name Indication. Defaults to false.

Disable Server Name Indication. Defaults to false.

Enable SSL. If not specified SSL is disabled.

Enable SSL. If not specified SSL is disabled.

Default RabbitMQ connection username

Default RabbitMQ connection username

Default RabbitMQ connection virtual host

Default RabbitMQ connection virtual host

Default RabbitMQ prefetch count for each channel

Default RabbitMQ prefetch count for each channel

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

The directory where Flow will persist its dets tables

The directory where Flow will persist its dets tables

Puts the value to Astarte.Flow.Config.astarte_instance/0. Optionally, receives the namespace.

Puts the value to Astarte.Flow.Config.persistency_dir/0. Optionally, receives the namespace.

Puts the value to Astarte.Flow.Config.target_namespace/0. Optionally, receives the namespace.

Puts the value to Astarte.Flow.Config.xandra_nodes/0. Optionally, receives the namespace.

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

Reloads the value for Astarte.Flow.Config.astarte_instance/0. Optionally, receives the namespace for the variable.

Reloads the value for Astarte.Flow.Config.default_amqp_connection_host/0. Optionally, receives the namespace for the variable.

Reloads the value for Astarte.Flow.Config.default_amqp_connection_password/0. Optionally, receives the namespace for the variable.

Reloads the value for Astarte.Flow.Config.default_amqp_connection_port/0. Optionally, receives the namespace for the variable.

Reloads the value for Astarte.Flow.Config.default_amqp_connection_ssl_ca_file/0. Optionally, receives the namespace for the variable.

Reloads the value for Astarte.Flow.Config.default_amqp_connection_ssl_enabled/0. Optionally, receives the namespace for the variable.

Reloads the value for Astarte.Flow.Config.default_amqp_connection_username/0. Optionally, receives the namespace for the variable.

Reloads the value for Astarte.Flow.Config.default_amqp_prefetch_count/0. Optionally, receives the namespace for the variable.

Reloads the value for Astarte.Flow.Config.disable_authentication/0. Optionally, receives the namespace for the variable.

Reloads the value for Astarte.Flow.Config.persistency_dir/0. Optionally, receives the namespace for the variable.

Reloads the value for Astarte.Flow.Config.realm_public_key_provider/0. Optionally, receives the namespace for the variable.

Reloads the value for Astarte.Flow.Config.realm_public_keys_dir/0. Optionally, receives the namespace for the variable.

Reloads the value for Astarte.Flow.Config.target_namespace/0. Optionally, receives the namespace for the variable.

Reloads the value for Astarte.Flow.Config.xandra_nodes/0. Optionally, receives the namespace for the variable.

Kubernetes namespace where Flow will deploy its containers

Kubernetes namespace where Flow will deploy its containers

Creates a template for OS environment variables given a filename. Additionally, it can receive a list of options

Validates that all required variables are present. Returns :ok if they are, {:error, errors} if they are not. errors will be a list of all errors encountered while getting required variables.

Validates that all required variables are present. Returns :ok if they are, raises if they're not.

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

Link to this section Types

@type options() ::
  {:username, String.t()}
  | {:password, String.t()}
  | {:virtual_host, String.t()}
  | {:host, String.t()}
  | {:port, integer()}
  | {:ssl_options, ssl_options()}
Link to this type

ssl_option()

@type ssl_option() ::
  {:cacertfile, String.t()}
  | {:verify, :verify_peer}
  | {:server_name_indication, :disable | charlist()}
  | {:depth, integer()}
Link to this type

ssl_options()

@type ssl_options() :: :none | [ssl_option()]

Link to this section Functions

Link to this function

astarte_instance(namespace \\ nil)

@spec astarte_instance(Skogsra.Env.namespace()) ::
  {:ok, binary()} | {:error, binary()}

Name of the Kubernetes instance of astarte which Flow will connect to

Calling Astarte.Flow.Config.astarte_instance() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_ASTARTE_INSTANCE"
  • Type: :binary
  • Default: "astarte"
  • Required: false
  • Cached: true
Link to this function

astarte_instance!(namespace \\ nil)

@spec astarte_instance!(Skogsra.Env.namespace()) :: binary() | no_return()

Name of the Kubernetes instance of astarte which Flow will connect to

Bang version of Astarte.Flow.Config.astarte_instance/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

default_amqp_connection!()

@spec default_amqp_connection!() :: [options()]

Returns the default amqp connection parameters

Link to this function

default_amqp_connection_host(namespace \\ nil)

@spec default_amqp_connection_host(Skogsra.Env.namespace()) ::
  {:ok, binary()} | {:error, binary()}

Default RabbitMQ connection host

Calling Astarte.Flow.Config.default_amqp_connection_host() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_DEFAULT_AMQP_CONNECTION_HOST"
  • Type: :binary
  • Default: "astarte"
  • Required: false
  • Cached: true
Link to this function

default_amqp_connection_host!(namespace \\ nil)

@spec default_amqp_connection_host!(Skogsra.Env.namespace()) :: binary() | no_return()

Default RabbitMQ connection host

Bang version of Astarte.Flow.Config.default_amqp_connection_host/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

default_amqp_connection_password(namespace \\ nil)

@spec default_amqp_connection_password(Skogsra.Env.namespace()) ::
  {:ok, binary()} | {:error, binary()}

Default RabbitMQ connection password

Calling Astarte.Flow.Config.default_amqp_connection_password() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_DEFAULT_AMQP_CONNECTION_PASSWORD"
  • Type: :binary
  • Default: "astarte"
  • Required: false
  • Cached: true
Link to this function

default_amqp_connection_password!(namespace \\ nil)

@spec default_amqp_connection_password!(Skogsra.Env.namespace()) ::
  binary() | no_return()

Default RabbitMQ connection password

Bang version of Astarte.Flow.Config.default_amqp_connection_password/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

default_amqp_connection_port(namespace \\ nil)

@spec default_amqp_connection_port(Skogsra.Env.namespace()) ::
  {:ok, integer()} | {:error, binary()}

Default RabbitMQ connection port

Calling Astarte.Flow.Config.default_amqp_connection_port() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_DEFAULT_AMQP_CONNECTION_PORT"
  • Type: :integer
  • Default: 5672
  • Required: false
  • Cached: true
Link to this function

default_amqp_connection_port!(namespace \\ nil)

@spec default_amqp_connection_port!(Skogsra.Env.namespace()) ::
  integer() | no_return()

Default RabbitMQ connection port

Bang version of Astarte.Flow.Config.default_amqp_connection_port/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

default_amqp_connection_ssl_ca_file(namespace \\ nil)

@spec default_amqp_connection_ssl_ca_file(Skogsra.Env.namespace()) ::
  {:ok, nil | binary()} | {:error, binary()}

Specifies the certificates of the root Certificate Authorities to be trusted. When not specified, the bundled cURL certificate bundle will be used.

Calling Astarte.Flow.Config.default_amqp_connection_ssl_ca_file() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_DEFAULT_AMQP_CONNECTION_SSL_CA_FILE"
  • Type: :binary
  • Default: nil
  • Required: false
  • Cached: true
Link to this function

default_amqp_connection_ssl_ca_file!(namespace \\ nil)

@spec default_amqp_connection_ssl_ca_file!(Skogsra.Env.namespace()) ::
  (nil | binary()) | no_return()

Specifies the certificates of the root Certificate Authorities to be trusted. When not specified, the bundled cURL certificate bundle will be used.

Bang version of Astarte.Flow.Config.default_amqp_connection_ssl_ca_file/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

default_amqp_connection_ssl_custom_sni(namespace \\ nil)

@spec default_amqp_connection_ssl_custom_sni(Skogsra.Env.namespace()) ::
  {:ok, nil | binary()} | {:error, binary()}

Specify the hostname to be used in TLS Server Name Indication extension. If not specified, the amqp host will be used. This value is used only if Server Name Indication is enabled.

Calling Astarte.Flow.Config.default_amqp_connection_ssl_custom_sni() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_DEFAULT_AMQP_CONNECTION_SSL_CUSTOM_SNI"
  • Type: :binary
  • Default: nil
  • Required: false
  • Cached: true
Link to this function

default_amqp_connection_ssl_custom_sni!(namespace \\ nil)

@spec default_amqp_connection_ssl_custom_sni!(Skogsra.Env.namespace()) ::
  (nil | binary()) | no_return()

Specify the hostname to be used in TLS Server Name Indication extension. If not specified, the amqp host will be used. This value is used only if Server Name Indication is enabled.

Bang version of Astarte.Flow.Config.default_amqp_connection_ssl_custom_sni/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

default_amqp_connection_ssl_disable_sni(namespace \\ nil)

@spec default_amqp_connection_ssl_disable_sni(Skogsra.Env.namespace()) ::
  {:ok, boolean()} | {:error, binary()}

Disable Server Name Indication. Defaults to false.

Calling Astarte.Flow.Config.default_amqp_connection_ssl_disable_sni() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_DEFAULT_AMQP_CONNECTION_SSL_DISABLE_SNI"
  • Type: :boolean
  • Default: false
  • Required: false
  • Cached: true
Link to this function

default_amqp_connection_ssl_disable_sni!(namespace \\ nil)

@spec default_amqp_connection_ssl_disable_sni!(Skogsra.Env.namespace()) ::
  boolean() | no_return()

Disable Server Name Indication. Defaults to false.

Bang version of Astarte.Flow.Config.default_amqp_connection_ssl_disable_sni/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

default_amqp_connection_ssl_enabled(namespace \\ nil)

@spec default_amqp_connection_ssl_enabled(Skogsra.Env.namespace()) ::
  {:ok, boolean()} | {:error, binary()}

Enable SSL. If not specified SSL is disabled.

Calling Astarte.Flow.Config.default_amqp_connection_ssl_enabled() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_DEFAULT_AMQP_CONNECTION_SSL_ENABLED"
  • Type: :boolean
  • Default: false
  • Required: false
  • Cached: true
Link to this function

default_amqp_connection_ssl_enabled!(namespace \\ nil)

@spec default_amqp_connection_ssl_enabled!(Skogsra.Env.namespace()) ::
  boolean() | no_return()

Enable SSL. If not specified SSL is disabled.

Bang version of Astarte.Flow.Config.default_amqp_connection_ssl_enabled/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

default_amqp_connection_username(namespace \\ nil)

@spec default_amqp_connection_username(Skogsra.Env.namespace()) ::
  {:ok, binary()} | {:error, binary()}

Default RabbitMQ connection username

Calling Astarte.Flow.Config.default_amqp_connection_username() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_DEFAULT_AMQP_CONNECTION_USERNAME"
  • Type: :binary
  • Default: "astarte"
  • Required: false
  • Cached: true
Link to this function

default_amqp_connection_username!(namespace \\ nil)

@spec default_amqp_connection_username!(Skogsra.Env.namespace()) ::
  binary() | no_return()

Default RabbitMQ connection username

Bang version of Astarte.Flow.Config.default_amqp_connection_username/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

default_amqp_connection_virtual_host(namespace \\ nil)

@spec default_amqp_connection_virtual_host(Skogsra.Env.namespace()) ::
  {:ok, binary()} | {:error, binary()}

Default RabbitMQ connection virtual host

Calling Astarte.Flow.Config.default_amqp_connection_virtual_host() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_DEFAULT_AMQP_CONNECTION_VIRTUAL_HOST"
  • Type: :binary
  • Default: "/"
  • Required: false
  • Cached: true
Link to this function

default_amqp_connection_virtual_host!(namespace \\ nil)

@spec default_amqp_connection_virtual_host!(Skogsra.Env.namespace()) ::
  binary() | no_return()

Default RabbitMQ connection virtual host

Bang version of Astarte.Flow.Config.default_amqp_connection_virtual_host/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

default_amqp_prefetch_count(namespace \\ nil)

@spec default_amqp_prefetch_count(Skogsra.Env.namespace()) ::
  {:ok, integer()} | {:error, binary()}

Default RabbitMQ prefetch count for each channel

Calling Astarte.Flow.Config.default_amqp_prefetch_count() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_DEFAULT_AMQP_PREFETCH_COUNT"
  • Type: :integer
  • Default: 100
  • Required: false
  • Cached: true
Link to this function

default_amqp_prefetch_count!(namespace \\ nil)

@spec default_amqp_prefetch_count!(Skogsra.Env.namespace()) :: integer() | no_return()

Default RabbitMQ prefetch count for each channel

Bang version of Astarte.Flow.Config.default_amqp_prefetch_count/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

disable_authentication(namespace \\ nil)

@spec disable_authentication(Skogsra.Env.namespace()) ::
  {:ok, boolean()} | {:error, binary()}

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

Calling Astarte.Flow.Config.disable_authentication() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_DISABLE_AUTHENTICATION"
  • Type: :boolean
  • Default: false
  • Required: false
  • Cached: true
Link to this function

disable_authentication!(namespace \\ nil)

@spec disable_authentication!(Skogsra.Env.namespace()) :: boolean() | no_return()

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

Bang version of Astarte.Flow.Config.disable_authentication/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

persistency_dir(namespace \\ nil)

@spec persistency_dir(Skogsra.Env.namespace()) :: {:ok, binary()} | {:error, binary()}

The directory where Flow will persist its dets tables

Calling Astarte.Flow.Config.persistency_dir() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_PERSISTENCY_DIR"
  • Type: :binary
  • Default: ""
  • Required: false
  • Cached: true
Link to this function

persistency_dir!(namespace \\ nil)

@spec persistency_dir!(Skogsra.Env.namespace()) :: binary() | no_return()

The directory where Flow will persist its dets tables

Bang version of Astarte.Flow.Config.persistency_dir/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

put_astarte_instance(value, namespace \\ nil)

@spec put_astarte_instance(binary(), Skogsra.Env.namespace()) ::
  :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.astarte_instance/0. Optionally, receives the namespace.

Link to this function

put_default_amqp_connection_host(value, namespace \\ nil)

@spec put_default_amqp_connection_host(binary(), Skogsra.Env.namespace()) ::
  :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.default_amqp_connection_host/0. Optionally, receives the namespace.

Link to this function

put_default_amqp_connection_password(value, namespace \\ nil)

@spec put_default_amqp_connection_password(binary(), Skogsra.Env.namespace()) ::
  :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.default_amqp_connection_password/0. Optionally, receives the namespace.

Link to this function

put_default_amqp_connection_port(value, namespace \\ nil)

@spec put_default_amqp_connection_port(integer(), Skogsra.Env.namespace()) ::
  :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.default_amqp_connection_port/0. Optionally, receives the namespace.

Link to this function

put_default_amqp_connection_ssl_ca_file(value, namespace \\ nil)

@spec put_default_amqp_connection_ssl_ca_file(nil | binary(), Skogsra.Env.namespace()) ::
  :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.default_amqp_connection_ssl_ca_file/0. Optionally, receives the namespace.

Link to this function

put_default_amqp_connection_ssl_custom_sni(value, namespace \\ nil)

@spec put_default_amqp_connection_ssl_custom_sni(
  nil | binary(),
  Skogsra.Env.namespace()
) :: :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.default_amqp_connection_ssl_custom_sni/0. Optionally, receives the namespace.

Link to this function

put_default_amqp_connection_ssl_disable_sni(value, namespace \\ nil)

@spec put_default_amqp_connection_ssl_disable_sni(boolean(), Skogsra.Env.namespace()) ::
  :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.default_amqp_connection_ssl_disable_sni/0. Optionally, receives the namespace.

Link to this function

put_default_amqp_connection_ssl_enabled(value, namespace \\ nil)

@spec put_default_amqp_connection_ssl_enabled(boolean(), Skogsra.Env.namespace()) ::
  :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.default_amqp_connection_ssl_enabled/0. Optionally, receives the namespace.

Link to this function

put_default_amqp_connection_username(value, namespace \\ nil)

@spec put_default_amqp_connection_username(binary(), Skogsra.Env.namespace()) ::
  :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.default_amqp_connection_username/0. Optionally, receives the namespace.

Link to this function

put_default_amqp_connection_virtual_host(value, namespace \\ nil)

@spec put_default_amqp_connection_virtual_host(binary(), Skogsra.Env.namespace()) ::
  :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.default_amqp_connection_virtual_host/0. Optionally, receives the namespace.

Link to this function

put_default_amqp_prefetch_count(value, namespace \\ nil)

@spec put_default_amqp_prefetch_count(integer(), Skogsra.Env.namespace()) ::
  :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.default_amqp_prefetch_count/0. Optionally, receives the namespace.

Link to this function

put_disable_authentication(value, namespace \\ nil)

@spec put_disable_authentication(boolean(), Skogsra.Env.namespace()) ::
  :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.disable_authentication/0. Optionally, receives the namespace.

Link to this function

put_persistency_dir(value, namespace \\ nil)

@spec put_persistency_dir(binary(), Skogsra.Env.namespace()) ::
  :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.persistency_dir/0. Optionally, receives the namespace.

Link to this function

put_realm_public_key_provider(value, namespace \\ nil)

@spec put_realm_public_key_provider(
  nil | Astarte.Flow.Auth.RealmPublicKeyProvider.t(),
  Skogsra.Env.namespace()
) :: :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.realm_public_key_provider/0. Optionally, receives the namespace.

Link to this function

put_realm_public_keys_dir(value, namespace \\ nil)

@spec put_realm_public_keys_dir(nil | binary(), Skogsra.Env.namespace()) ::
  :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.realm_public_keys_dir/0. Optionally, receives the namespace.

Link to this function

put_target_namespace(value, namespace \\ nil)

@spec put_target_namespace(binary(), Skogsra.Env.namespace()) ::
  :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.target_namespace/0. Optionally, receives the namespace.

Link to this function

put_xandra_nodes(value, namespace \\ nil)

@spec put_xandra_nodes(
  nil | Astarte.Flow.Config.XandraNodes.t(),
  Skogsra.Env.namespace()
) :: :ok | {:error, binary()}

Puts the value to Astarte.Flow.Config.xandra_nodes/0. Optionally, receives the namespace.

Link to this function

realm_public_key_provider(namespace \\ nil)

@spec realm_public_key_provider(Skogsra.Env.namespace()) ::
  {:ok, nil | Astarte.Flow.Auth.RealmPublicKeyProvider.t()} | {:error, binary()}

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

Calling Astarte.Flow.Config.realm_public_key_provider() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_REALM_PUBLIC_KEY_PROVIDER"
  • Type: Astarte.Flow.Auth.RealmPublicKeyProvider
  • Default: nil
  • Required: false
  • Cached: true
Link to this function

realm_public_key_provider!(namespace \\ nil)

@spec realm_public_key_provider!(Skogsra.Env.namespace()) ::
  (nil | Astarte.Flow.Auth.RealmPublicKeyProvider.t()) | no_return()

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

Bang version of Astarte.Flow.Config.realm_public_key_provider/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

realm_public_keys_dir(namespace \\ nil)

@spec realm_public_keys_dir(Skogsra.Env.namespace()) ::
  {:ok, nil | binary()} | {:error, binary()}

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

Calling Astarte.Flow.Config.realm_public_keys_dir() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_REALM_PUBLIC_KEYS_DIR"
  • Type: :binary
  • Default: nil
  • Required: false
  • Cached: true
Link to this function

realm_public_keys_dir!(namespace \\ nil)

@spec realm_public_keys_dir!(Skogsra.Env.namespace()) ::
  (nil | binary()) | no_return()

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

Bang version of Astarte.Flow.Config.realm_public_keys_dir/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

reload_astarte_instance(namespace \\ nil)

@spec reload_astarte_instance(Skogsra.Env.namespace()) ::
  {:ok, binary()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.astarte_instance/0. Optionally, receives the namespace for the variable.

Link to this function

reload_default_amqp_connection_host(namespace \\ nil)

@spec reload_default_amqp_connection_host(Skogsra.Env.namespace()) ::
  {:ok, binary()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.default_amqp_connection_host/0. Optionally, receives the namespace for the variable.

Link to this function

reload_default_amqp_connection_password(namespace \\ nil)

@spec reload_default_amqp_connection_password(Skogsra.Env.namespace()) ::
  {:ok, binary()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.default_amqp_connection_password/0. Optionally, receives the namespace for the variable.

Link to this function

reload_default_amqp_connection_port(namespace \\ nil)

@spec reload_default_amqp_connection_port(Skogsra.Env.namespace()) ::
  {:ok, integer()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.default_amqp_connection_port/0. Optionally, receives the namespace for the variable.

Link to this function

reload_default_amqp_connection_ssl_ca_file(namespace \\ nil)

@spec reload_default_amqp_connection_ssl_ca_file(Skogsra.Env.namespace()) ::
  {:ok, nil | binary()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.default_amqp_connection_ssl_ca_file/0. Optionally, receives the namespace for the variable.

Link to this function

reload_default_amqp_connection_ssl_custom_sni(namespace \\ nil)

@spec reload_default_amqp_connection_ssl_custom_sni(Skogsra.Env.namespace()) ::
  {:ok, nil | binary()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.default_amqp_connection_ssl_custom_sni/0. Optionally, receives the namespace for the variable.

Link to this function

reload_default_amqp_connection_ssl_disable_sni(namespace \\ nil)

@spec reload_default_amqp_connection_ssl_disable_sni(Skogsra.Env.namespace()) ::
  {:ok, boolean()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.default_amqp_connection_ssl_disable_sni/0. Optionally, receives the namespace for the variable.

Link to this function

reload_default_amqp_connection_ssl_enabled(namespace \\ nil)

@spec reload_default_amqp_connection_ssl_enabled(Skogsra.Env.namespace()) ::
  {:ok, boolean()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.default_amqp_connection_ssl_enabled/0. Optionally, receives the namespace for the variable.

Link to this function

reload_default_amqp_connection_username(namespace \\ nil)

@spec reload_default_amqp_connection_username(Skogsra.Env.namespace()) ::
  {:ok, binary()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.default_amqp_connection_username/0. Optionally, receives the namespace for the variable.

Link to this function

reload_default_amqp_connection_virtual_host(namespace \\ nil)

@spec reload_default_amqp_connection_virtual_host(Skogsra.Env.namespace()) ::
  {:ok, binary()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.default_amqp_connection_virtual_host/0. Optionally, receives the namespace for the variable.

Link to this function

reload_default_amqp_prefetch_count(namespace \\ nil)

@spec reload_default_amqp_prefetch_count(Skogsra.Env.namespace()) ::
  {:ok, integer()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.default_amqp_prefetch_count/0. Optionally, receives the namespace for the variable.

Link to this function

reload_disable_authentication(namespace \\ nil)

@spec reload_disable_authentication(Skogsra.Env.namespace()) ::
  {:ok, boolean()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.disable_authentication/0. Optionally, receives the namespace for the variable.

Link to this function

reload_persistency_dir(namespace \\ nil)

@spec reload_persistency_dir(Skogsra.Env.namespace()) ::
  {:ok, binary()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.persistency_dir/0. Optionally, receives the namespace for the variable.

Link to this function

reload_realm_public_key_provider(namespace \\ nil)

@spec reload_realm_public_key_provider(Skogsra.Env.namespace()) ::
  {:ok, nil | Astarte.Flow.Auth.RealmPublicKeyProvider.t()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.realm_public_key_provider/0. Optionally, receives the namespace for the variable.

Link to this function

reload_realm_public_keys_dir(namespace \\ nil)

@spec reload_realm_public_keys_dir(Skogsra.Env.namespace()) ::
  {:ok, nil | binary()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.realm_public_keys_dir/0. Optionally, receives the namespace for the variable.

Link to this function

reload_target_namespace(namespace \\ nil)

@spec reload_target_namespace(Skogsra.Env.namespace()) ::
  {:ok, binary()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.target_namespace/0. Optionally, receives the namespace for the variable.

Link to this function

reload_xandra_nodes(namespace \\ nil)

@spec reload_xandra_nodes(Skogsra.Env.namespace()) ::
  {:ok, nil | Astarte.Flow.Config.XandraNodes.t()} | {:error, binary()}

Reloads the value for Astarte.Flow.Config.xandra_nodes/0. Optionally, receives the namespace for the variable.

Link to this function

target_namespace(namespace \\ nil)

@spec target_namespace(Skogsra.Env.namespace()) ::
  {:ok, binary()} | {:error, binary()}

Kubernetes namespace where Flow will deploy its containers

Calling Astarte.Flow.Config.target_namespace() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "FLOW_TARGET_NAMESPACE"
  • Type: :binary
  • Default: "astarte"
  • Required: false
  • Cached: true
Link to this function

target_namespace!(namespace \\ nil)

@spec target_namespace!(Skogsra.Env.namespace()) :: binary() | no_return()

Kubernetes namespace where Flow will deploy its containers

Bang version of Astarte.Flow.Config.target_namespace/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

template(filename, options \\ [])

@spec template(Path.t(), keyword()) :: :ok | {:error, File.posix()}

Creates a template for OS environment variables given a filename. Additionally, it can receive a list of options:

  • type: What kind of file it will generate (:elixir, :unix, :windows).
  • namespace: Namespace for the variables.
Link to this function

validate(namespace \\ nil)

@spec validate(Skogsra.Env.namespace()) :: :ok | {:error, [binary()]}

Validates that all required variables are present. Returns :ok if they are, {:error, errors} if they are not. errors will be a list of all errors encountered while getting required variables.

It is possible to provide a namespace as argument (defaults to nil).

Link to this function

validate!(namespace \\ nil)

@spec validate!(Skogsra.Env.namespace()) :: :ok | no_return()

Validates that all required variables are present. Returns :ok if they are, raises if they're not.

It is possible to provide a namespace as argument (defaults to nil).

Link to this function

xandra_nodes(namespace \\ nil)

@spec xandra_nodes(Skogsra.Env.namespace()) ::
  {:ok, nil | Astarte.Flow.Config.XandraNodes.t()} | {:error, binary()}

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

Calling Astarte.Flow.Config.xandra_nodes() will ensure the following:

  • Binding order: [:system, :config]
  • OS environment variable: "CASSANDRA_NODES"
  • Type: Astarte.Flow.Config.XandraNodes
  • Default: nil
  • Required: false
  • Cached: true
Link to this function

xandra_nodes!(namespace \\ nil)

@spec xandra_nodes!(Skogsra.Env.namespace()) ::
  (nil | Astarte.Flow.Config.XandraNodes.t()) | no_return()

Disables the authentication. CHANGING IT TO TRUE IS GENERALLY A REALLY BAD IDEA IN A PRODUCTION ENVIRONMENT, IF YOU DON'T KNOW WHAT YOU ARE DOING."

Bang version of Astarte.Flow.Config.xandra_nodes/0 (fails on error). Optionally, receives the namespace for the variable.