MyHttpServer.Config (lamina v0.2.1)

This is an example configuration module, mostly used to tests.

Link to this section Summary

Functions

The address of the network interface upon which to bind.

The TCP port upon which to listen for HTTP requests.

Subscribe the calling process to notifications about configuration changes.

Unsubscribe the calling process from configuration change notifications.

Link to this section Functions

Link to this function

listen_address()

The address of the network interface upon which to bind.

Link to this function

listen_address!()

The TCP port upon which to listen for HTTP requests.

Link to this function

subscribe(config_key)

Specs

subscribe(atom()) :: :ok

Subscribe the calling process to notifications about configuration changes.

Messages in the form of {:config_change, MyHttpServer.Config, config_key, old_value, new_value} will be sent to the receiving process when a configuration change is detected.

Link to this function

unsubscribe(config_key)

Specs

unsubscribe(atom()) :: :ok

Unsubscribe the calling process from configuration change notifications.