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
@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
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.
@spec get_http_client_pool_size() :: non_neg_integer()
Gets the number of concurrent clients to call CosmosDB REST API.
@spec resource_creation_headers(database_throughput_mode()) :: [{binary(), binary()}]
Defines the default resource creation API headers.