Riverside.Config (riverside v2.0.0)

Helper for config data

Link to this section Summary

Functions

Ensure passed module is compiled already. Or else, this function raise an error.

Get runtime port number from configuration

Load handler's configuration.

Pick the TransmissionLimitter's parameters from Handlers configuration.

Link to this section Types

Specs

port_type() :: pos_integer() | {atom(), String.t(), pos_integer()}

Specs

t() :: %Riverside.Config{
  codec: module(),
  connection_max_age: non_neg_integer(),
  idle_timeout: non_neg_integer(),
  max_connections: non_neg_integer(),
  path: String.t(),
  port: non_neg_integer(),
  reuse_port: boolean(),
  show_debug_logs: boolean(),
  transmission_limit: Keyword.t()
}

Link to this section Functions

Link to this function

ensure_module_loaded(module)

Specs

ensure_module_loaded(module()) :: :ok

Ensure passed module is compiled already. Or else, this function raise an error.

Specs

get_port(port_type()) :: pos_integer()

Get runtime port number from configuration

Link to this function

load(handler, opts)

Specs

load(module(), any()) :: any()

Load handler's configuration.

Link to this function

transmission_limit(config)

Specs

transmission_limit(any()) :: keyword()

Pick the TransmissionLimitter's parameters from Handlers configuration.