To scaffold projects more easily, see generator-azure-chaos-fn. ✨
The base module for all azure-chaos extensions ⚙️ :robot_face:
This module defines a javascript
framework that is helpful when authoring azure-chaos functions. It provides a lightweight processing pipeline that allows extension authors to more easily engineer chaos, without worrying about communication details with the orchestrator.
If your functions are
async
they should return aPromise
!
Current version is v1
- access it with require('azure-chaos-fn/v1')
or require('azure-chaos-fn').v1
.
Function
that bootstraps the request to start chaos. Should be given context
(from azure functions) and func
(the function to run).
Example:
const yourFunc = require('./your-func')
bootStrap(context, yourFunc)
Function
that bootstraps the request to stop chaos. Should be given context
(from azure functions) and func
(the function to run).
Example:
const yourFunc = require('./your-func')
bootStrap(context, yourFunc)
Represents a request
String
- the access token to use when issuing requests to azure
Array
of ChaosResourceIds
Function
that takes a status
(a Number) and optionally a desc
(a String) that describe the result of the request for chaos.
Example:
res.status(200, JSON.stringify({status: 'all good'}))
Function
that locks the response, indicating it's ready to be sent and will have no more action taken upon it. This can only be called once.
Bool
that indicates if end was called.
Represents the tri-part resourceIds
that are passed in a ChaosRequest
.
String
- the subscription id
String
- the resource id
String
- The resource group
MIT