Ryan Brink
05/07/2022, 2:52 PMAleksei Tirman [JB]
05/08/2022, 8:43 AMRyan Brink
05/08/2022, 1:45 PMAleksei Tirman [JB]
05/09/2022, 7:04 AMRustam Siniukov
05/09/2022, 12:51 PMpipeline
to route and iterate through its parents to get the full routeRyan Brink
05/20/2022, 12:54 AMcreateRouteScopedPlugin()
I’m not sure where I’m finding this pipeline. Would I need to wait until an application event trigger to do this? Because at the moment I am able to handle everything in the PluginBuilder context, and would prefer to not have to monitor for some API event before constructing the path (if possible)Rustam Siniukov
05/20/2022, 12:07 PMpipeline
is internal inside PluginBuilder
. As a workaround you can create a hook to expose the pipeline
private object InstallHook : Hook<(ApplicationCallPipeline) -> Unit> {
override fun install(pipeline: ApplicationCallPipeline, handler: (ApplicationCallPipeline) -> Unit) {
handler(pipeline)
}
}
public val plugin = createRouteScopedPlugin("MyPlugin") {
on(InstallHook) {
val route = it as? Route ?: return@on
}
}
Ryan Brink
05/20/2022, 3:42 PMRustam Siniukov
05/20/2022, 3:46 PMRyan Brink
05/20/2022, 3:49 PM