Variable

class Variable(var current: Behaviour = None()) : Behaviour

Provide a means of modifying a ChaosBehaviour at runtime.

Constructors

Link copied to clipboard
constructor(current: Behaviour = None())

Properties

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard

Converts this chaos stage to a standard http4k Filter.

Link copied to clipboard
open operator override fun invoke(next: HttpHandler): HttpHandler
Link copied to clipboard
fun Stage.then(nextStage: Stage): (Request) -> Filter?

Chain the next ChaosBehaviour to apply when this stage is finished.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun Stage.until(trigger: Trigger): Stage

Stop applying the ChaosBehaviour of this stage when the ChaosTrigger fires.

Link copied to clipboard
fun HttpHandler.withChaosApi(engine: ChaosEngine = ChaosEngine(), security: Security = NoSecurity, controlsPath: String = "/chaos", openApiPath: String = "", corsPolicy: CorsPolicy = UnsafeGlobalPermissive, clock: Clock = Clock.systemUTC(), apiName: String = "http4k"): RoutingHttpHandler

Mixin the set of remote Chaos API endpoints to a standard HttpHandler, using the passed ChaosStage. Optionally a Security can be passed to limit access to the chaos controls.