0.2.0 • Published 9 years ago

layar-client v0.2.0

Weekly downloads
1
License
BSD-3-Clause
Repository
github
Last release
9 years ago

layar-client Build Status codecov.io Package Version

Tiny wrapper around websocket for easily connecting to layar server

Installation

$ npm install layar-client --save

Usage

var lc = require('layar-client');
var client = lc('http://layar.server.com')

// create a multiple section
var configSection = client('config_update');
var releaseSection = client('release_web');

// start a section
var currentHost = 'web01';
var info = { username: 'semmatabei', commitHash: '1fbb8fe' };
releaseSection.start(currentHost, info);

// end a section
// default status is 'completed'
releaseSection.end();

// or specify custom status
releaseSection.end('stopped');

// and add additional info
releaseSection.end('failed', { info: 'failed to do something '});

// send log
var logMessage = 'switching web01 traffic';
releaseSection.log(logMessage);

// abort section
// internally .abort() uses .end() with 'error' status
var errorMessage = 'failed to switch web01 traffic';
releaseSection.abort(errorMessage);
0.2.0

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago