Ability to provide initialization settings to CoR is added. So, we now able to do something like:
val settings = MySettings(
myArg = "My Value"
)
val chain = rootChain<MyContext, MySettings>(settings) {
someWorker()
}.build()
fun ICorAddDsl<MyContext, MySettings>.someWorker = worker {
// This is initialization stage
val myArg = this.config.myArg
handle {
// This is runtime stage
printlin("Here we use myArg: $myArg")
}
}
chain.exec(MyContext())