0.1.0 • Published 10 years ago

ee-soa-transportmanager v0.1.0

Weekly downloads
5
License
-
Repository
github
Last release
10 years ago

ee-soa-transportmanager

Manages the SOA Transports

installation

 npm install ee-soa-transportmanager

build status

Build Status

usage

The transportmanager is able to send requests through different means of transport.

var   TransportManager 	= require('ee-soa-transportmanager')
	, transport  		= new TransportManager();


transport.use(new Transport());

transport.on('request', function(request, response){
	if (request.getDiscovery() === 'discovered') {
		// the request was already sent through the discovery
		// send it to a service in the local process
	}
	else {
		// go through discovery, send to another service
		// through the transport defined in the discovery response

	}
});



// send a request using the local transport
transport.request('local', request, response);