What if...?
http-server main {
bind "127.0.0.1:42069"
with script language=roto path="nsoe/main.roto" {
module "nsoe/module"
configuration-file "nsoe.kdl"
}
with metrics main
}
prometheus-server main {
bind "127.0.0.1:42042"
persist path=nsoe.json interval="1h"
}
And then, nsoe.kdl would contain the script's configuration. One could also opt to embed the configuration within iocaine's config file, using configuration { ... }.
A couple of implications:
declare-handler: it's replaced withwith script, and is tied tohttp-server/haproxy-spoa-server.Currently, the module and the script must use the same language. But that limitation may end up lifted at some point, in which case
modulewill grow alanguage=$fooattribute.