MyHttpServer.Config (lamina v0.4.2)
This is an example configuration module, mostly used for tests.
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.
Functions
Link to this function
listen_address()
The address of the network interface upon which to bind.
Link to this function
listen_address!()
Link to this function
listen_port()
The TCP port upon which to listen for HTTP requests.
Link to this function
listen_port!()
Link to this function
subscribe(config_key)
@spec 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)
@spec unsubscribe(atom()) :: :ok
Unsubscribe the calling process from configuration change notifications.