http4k / org.http4k.chaos

Package org.http4k.chaos


Name Summary
ChaosBehaviours object ChaosBehaviours
ChaosControls object ChaosControls
Adds a set of endpoints to an application which will control the switching on/off of chaos behaviour. The added endpoints are: GET //status <- check the on off/status of the injected chaos POST //activate <- turn on the chaos. optionally POST a JSON body to set a list of new stages to use. POST //deactivate <- turn off the chaos POST //toggle <- toggle the chaos
ChaosStages object ChaosStages
ChaosTriggers object ChaosTriggers
Stage interface Stage : (Request) -> Filter?
Defines a periodic element during which a particular ChaosBehaviour is active.
SwitchTrigger class SwitchTrigger : Trigger
Simple toggleable trigger to turn ChaosBehaviour on/off

Type Aliases

Name Summary
Behaviour typealias Behaviour = Filter
Encapsulates the type of bad behaviour to apply to the response.
Trigger typealias Trigger = (req: Request) -> Boolean

Extensions for External Classes

Name Summary


Name Summary
CHAOS val Common.CHAOS: BiDiLens<HttpMessage, String>


Name Summary
appliedWhen fun Behaviour.appliedWhen(trigger: Trigger): Stage
asFilter fun Stage.asFilter(): Filter
Converts this chaos behaviour to a standard http4k Filter.
then fun Stage.then(nextStage: Stage): Stage
Chain the next ChaosBehaviour to apply when this stage is finished.
until fun Stage.until(trigger: Trigger): Stage
Stop applying the ChaosBehaviour of this stage when the ChaosTrigger fires.