Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

azure-chaos-fn

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azure-chaos-fn

The base module for all azure-chaos extensions

  • 1.0.1
  • npm
  • Socket score

Version published
Weekly downloads
6
Maintainers
2
Weekly downloads
 
Created
Source

azure-chaos-fn

Build Status

To scaffold projects more easily, see generator-azure-chaos-fn. :sparkles:

The base module for all azure-chaos extensions :gear: :robot_face:

readme logo

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.

API

If your functions are async they should return a Promise!

Current version is v1 - access it with require('azure-chaos-fn/v1') or require('azure-chaos-fn').v1.

start.bootStrap

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)

stop.bootStrap

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)

ChaosRequest

Represents a request

accessToken

String - the access token to use when issuing requests to azure

resourceIds

Array of ChaosResourceIds

ChaosResponse

status

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'}))
end

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.

wasEnded

Bool that indicates if end was called.

ChaosResourceId

Represents the tri-part resourceIds that are passed in a ChaosRequest.

subscription

String - the subscription id

resourceId

String - the resource id

resourceGroup

String - The resource group

License

MIT

Keywords

FAQs

Package last updated on 06 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc