All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lightningkite.lightningserver.pubsub.PubSubSettings.kt Maven / Gradle / Ivy

The newest version!
package com.lightningkite.lightningserver.pubsub

import com.lightningkite.lightningserver.settings.Pluggable
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class PubSubSettings(
    val url: String = "local",
    @SerialName("uri") val legacyUri: String? = null,
) : () -> PubSub {
    companion object : Pluggable() {
        init {
            register("local") { LocalPubSub }
        }
    }

    override fun invoke(): PubSub = parse((legacyUri ?: url).substringBefore("://"), this.copy(url = legacyUri ?: url))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy