StartLauncherPlugin

Default startup plugin. See setupDI and startPlugin for more info

Functions

Link copied to clipboard
open override fun <Error class: unknown class>.setupDI(config: JsonObject)

Will deserialize Config from config, register it in receiver Module (as well as CoroutineScope and kotlinx.serialization.json.Json)

fun <Error class: unknown class>.setupDI(config: Config, rawJsonObject: JsonObject? = null)
Link copied to clipboard
suspend fun start(config: Config): <Error class: unknown class>

Call start with deserialized Config as is and serialize it to JsonObject to pass as the first parameter to the basic start method

suspend fun start(rawConfig: JsonObject): <Error class: unknown class>

Call start with deserialized Config as config and rawConfig as is

suspend fun start(config: Config, rawConfig: JsonObject): <Error class: unknown class>

Will create KoinApplication, init, load modules using StartLauncherPlugin and start plugins using the same base plugin. It is basic start method which accepts both config and rawConfig which suppose to be the same or at least rawConfig must contain serialized variant of config

Link copied to clipboard
fun startAsync(config: Config): Pair<<Error class: unknown class>, Job>

Call start with deserialized Config as is and serialize it to JsonObject to pass as the first parameter to the basic start method

fun startAsync(rawConfig: JsonObject): Pair<<Error class: unknown class>, Job>

Call start with deserialized Config as config and rawConfig as is

fun startAsync(config: Config, rawConfig: JsonObject): Pair<<Error class: unknown class>, Job>

Will create KoinApplication, init, load modules using StartLauncherPlugin and start plugins using the same base plugin. It is basic start method which accepts both config and rawConfig which suppose to be the same or at least rawConfig must contain serialized variant of config.

Link copied to clipboard
open suspend override fun startPlugin(koin: <Error class: unknown class>)

Takes CoroutineScope and Config from the koin, and call starting of each plugin from Config.plugins ASYNCHRONOUSLY. Just like in setupDI, in case of fail in some plugin it will be reported using logger