api

http4k / org.http4k.chaos

Package org.http4k.chaos

Types

Name Summary
ChaosBehaviours object ChaosBehaviours
ChaosEngine object ChaosEngine
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
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.
Stage typealias Stage = (Request) -> Filter?
Defines a periodic element during which a particular ChaosBehaviour is active.
Trigger typealias Trigger = (req: Request) -> Boolean

Extensions for External Classes

Name Summary
com.fasterxml.jackson.databind.JsonNode  
kotlin.Function1  

Properties

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

Functions

Name Summary
appliedWhen fun Behaviour.appliedWhen(trigger: Trigger): Stage
withChaosControls fun RoutingHttpHandler.~~withChaosControls~~(stage: Stage = Wait, security: Security = NoSecurity, controlsPath: String = "/chaos", openApiPath: String = "", corsPolicy: CorsPolicy = UnsafeGlobalPermissive): RoutingHttpHandler
withChaosEngine fun RoutingHttpHandler.withChaosEngine(stage: Stage = Wait, security: Security = NoSecurity, controlsPath: String = "/chaos", openApiPath: String = "", corsPolicy: CorsPolicy = UnsafeGlobalPermissive): RoutingHttpHandler
Convert a standard HttpHandler to be Chaos-enabled, using the passed ChaosStage. Optionally a Security can be passed to limit access to the chaos controls.