Configuration Language

The configuration language consists of directives that are applied in order, and that must all end with ;. The configuration language adopts a syntax similar to Java/C/C++. Comments are either single line comment with // comment or multi-line comments with /* comment */ .

Configuration objects can set all their fields with a single directive using syntax.

obj = {
       .field1 = xx,
       .field2 = yy,
};

To enforce configuration consistency, the order of fields is imposed and must follow the documentation order.

It's also possible to alter an object's fields using the usual object notation. The syntax is the following.

obj.field1 = zzz;

Whenever a list of objects is expected (e.g., a list of endpoints), they are provided enclosed in braces {"a", "b", "c"}.

obj = {
      .field1 = {"http://a", "http://b", "http://c"},
      .field2 = yy,
};

Actions that are not immediate are required to be preceded by the co_await keyword. The documentation indicates when they must be used, but as a rule of thumb, anything that involves network or file operations (e.g., sending a response or reading a file) requires co_await.

Some configuration objects are built as a result of a function, and they can appear wherever a value appeared in the previous examples.

obj = {
      .field1 = {func("a"), func("b")},
      .field2 = func("c"),
};
obj.field3 = func("d");