- Added new module `config`
- Added new type `Config` which is used for configuring an instance of `Manager`
- Added `defaultConfig()` which returns the default `Config` instance used
This commit is contained in:
Tristan B. Velloza Kildaire 2023-04-06 08:49:02 +02:00
parent 4632929123
commit af4eed748f
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
/**
* Configuration for the manager
*/
module tristanable.manager.config;
/**
* Manager parameters
*/
public struct Config
{
/**
* If set to true then when one uses
* `sendMessage(TaggedMessage)` the
* manager will check if a queue with
* said tag has not been registered
* and if so, then register it for
* us before encoding-and-sending
*/
public bool registerOnSend = false;
}
/**
* Generates the default configuration to use for
* the manager
*
* Returns: the Config
*/
public Config defaultConfig()
{
return Config();
}