Behaviour

abstract class Behaviour : Filter

Encapsulates the type of bad behaviour to apply to the response.

Inheritors

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Link copied to clipboard

Converts this chaos stage to a standard http4k Filter.

Link copied to clipboard
abstract operator fun invoke(p1: 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
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.