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

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

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

interface ServiceWatchPolicy {
    fun shouldBeWatched(service: String, tags: List): Boolean
}

object NoOpServiceWatchPolicy : ServiceWatchPolicy {
    override fun shouldBeWatched(service: String, tags: List): Boolean = true
}

class TagBlacklistServiceWatchPolicy(
    private val blacklistedTags: List
) : ServiceWatchPolicy {
    override fun shouldBeWatched(service: String, tags: List): Boolean =
        blacklistedTags.any { tags.contains(it) }.not()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy