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

backtrace-service

Package Overview
Dependencies
Maintainers
1
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backtrace-service

Backtrace Service middleware

  • 1.0.2
  • npm
  • Socket score

Version published
Weekly downloads
531
increased by5.57%
Maintainers
1
Weekly downloads
 
Created
Source

Backtrace Service Layer nodejs library

This library consists of a single express.js middleware function. It may contain other common Service Layer related capabilities later.

Quick Example

const svclayer = require('backtrace-svclayer');
const atokens = ["asdfghjk"];
app.post("${url_prefix}/service", svclayer.serviceRequest({
  authTokens: atokens,
  coronerdCallback: (url) => {
    console.log('heard from coronerd at: ' + url);
  },
}));

Options for serviceRequest

The following options are accepted as the sole argument for the call:

  • authTokens: The list of authentication tokens to accept from coronerd instances attempting to register themselves with the service.
  • coronerdCallback: A callback that takes an URL parameter, and performs any service specific setup associated with integrating a new coronerd instance.
  • logger (optional): An object that has a log function which can be logged to. For example, winston logger instances.

Service flow

Services are expected to configure one or more authentication tokens, which will be distributed to coronerd instances using the service. While a service is running, it may receive registration requests at ${url_prefix}/service, which enable the service to integrate new coronerd instances on the fly.

Coronerd URLs provided as the url parameter to coronerdCallback are the base URLs, for example, https://backtrace.sp.backtrace.io/. Services may expect to append the appropriate resource for their needs, e.g. /api/config, to reach that resource on the coronerd instance.

Keywords

FAQs

Package last updated on 02 Apr 2019

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