View Source Cosmox.Configuration (Cosmox v0.1.1)

Gets the configuration values from the configuration files. The configuration will be built in at compile time.

Link to this section Summary

Types

Defines the database throughput mode. :none - THe database throughput will be automatically defined. {:fixed, throughput} - The database throughput will be fixed to the given value for every collection. {:autopilot, max_throughput} - The database throughput will be automatically defined by the system, but it will not exceed the given value.

Functions

Helper to get the db configuration.

Gets the CosmosDB database host.

Gets the CosmosDB database primary key.

Gets the number of concurrent clients to call CosmosDB REST API.

Defines the default resource creation API headers.

Link to this section Types

Link to this type

database_throughput_mode()

View Source
@type database_throughput_mode() ::
  :none | {:fixed, non_neg_integer()} | {:autopilot, non_neg_integer()}

Defines the database throughput mode. :none - THe database throughput will be automatically defined. {:fixed, throughput} - The database throughput will be fixed to the given value for every collection. {:autopilot, max_throughput} - The database throughput will be automatically defined by the system, but it will not exceed the given value.

Link to this section Functions

@spec get_cosmos_db_config() :: {binary(), binary()}

Helper to get the db configuration.

@spec get_cosmos_db_host() :: binary()

Gets the CosmosDB database host.

@spec get_cosmos_db_key() :: binary()

Gets the CosmosDB database primary key.

Link to this function

get_http_client_pool_size()

View Source
@spec get_http_client_pool_size() :: non_neg_integer()

Gets the number of concurrent clients to call CosmosDB REST API.

Link to this function

resource_creation_headers(arg1)

View Source
@spec resource_creation_headers(database_throughput_mode()) :: [{binary(), binary()}]

Defines the default resource creation API headers.