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

pl.allegro.tech.servicemesh.envoycontrol.services.ClusterState.kt Maven / Gradle / Ivy

package pl.allegro.tech.servicemesh.envoycontrol.services

enum class Locality {
    LOCAL, REMOTE
}

data class ClusterState(
    val servicesState: ServicesState,
    val locality: Locality,
    val cluster: String
)

data class MultiClusterState(private val l: List = listOf()) : Collection by l {

    constructor(state: ClusterState) : this(listOf(state))

    companion object {
        fun empty() = MultiClusterState(emptyList())
        fun ClusterState.toMultiClusterState() = MultiClusterState(this)
        fun List.toMultiClusterState() = MultiClusterState(this)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy