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

xen-service

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xen-service

Simple and flexible microservice library

  • 0.1.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Xen Service

Simple and flexible microservice library. Features:

  • declarative constructor syntax
  • action/dispatch-based internal RPC (inspired by Flux)
  • functional to the core
  • build services with RxJS 5, Promises, or blocking code
  • TODO wrap dispatch in middleware, or override it completely
  • TODO external RPC helper for Docker Swarm mode service discovery
  • TODO trace dispatches across multiple nested procedure calls

WIP Creating a Service

XenServer.createService accepts a service config object and returns an Observable.

const XenService = require('xen-service');

// Configure your new service
XenService.createService({
  name: 'MyService',
  procedures: {
    test: () => 'Prepare for unforeseen consequences'
  }
})
// Create the service by subscribing to it
.subscribe(service => {
  // Once the service is ready, invoke the "test" procedure by
  // dispatching an action of the same type
  service.dispatch({
    type: 'test'
  })
  .subscribe(response => {
    console.log(service); // 'Prepare for unforeseen consequences'
  });
})

FAQs

Package last updated on 31 Jan 2017

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