api

http4k / org.http4k.chaos / ChaosTriggers / PercentageBased

PercentageBased

object PercentageBased

Applies n% of the time, based on result of a Random.

Functions

Name Summary
fromEnvironment Get a percentage from the environment. Defaults to CHAOS_PERCENTAGE and a value of 50%fun fromEnvironment(env: (String) -> String? = System::getenv, defaultPercentage: Int = 50, name: String = "CHAOS_PERCENTAGE"): Trigger
invoke operator fun invoke(injectionFrequency: Int, selector: Random = Random): Trigger