Riverside.Config (riverside v2.2.1)

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 cowboy options

Get runtime port number from configuration

Get runtime TLS flag

Get runtime TLS cert file

Get runtime TLS key file

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(),
  cowboy_opts: keyword(),
  idle_timeout: non_neg_integer(),
  max_connections: non_neg_integer(),
  otp_app: atom(),
  path: String.t(),
  port: non_neg_integer(),
  reuse_port: boolean(),
  show_debug_logs: boolean(),
  tls: boolean(),
  tls_certfile: String.t(),
  tls_keyfile: String.t(),
  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.

Link to this function

get_cowboy_opts(opts)

Specs

get_cowboy_opts(term()) :: keyword()

Get runtime cowboy options

Specs

get_port(port_type()) :: pos_integer()

Get runtime port number from configuration

Link to this function

get_tls(tls_flag)

Specs

get_tls(term()) :: boolean()

Get runtime TLS flag

Link to this function

get_tls_certfile(path)

Specs

get_tls_certfile(term()) :: String.t()

Get runtime TLS cert file

Link to this function

get_tls_keyfile(path)

Specs

get_tls_keyfile(term()) :: String.t()

Get runtime TLS key file

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.