Name: scattr
Owner: gophergala2016
Description: A scriptable scatter-gather service over HTTP
Created: 2016-01-22 19:23:58.0
Updated: 2018-02-12 04:20:58.0
Pushed: 2016-01-24 20:32:31.0
Size: 3770
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a light weight server that users an incoming http request as a trigger to initiate http requests to one or more configured end points, waits until it receives responses for each such request and then combines the individual responses to prepare the final consolidated response for the original request. Custom logic can be scripted via JavaScript to control how the individual responses are processed. Scattr has builtin admin interface to easily add / remove endpoint and filter scripts .
The following schematic gives a very high-level overview of the workings of Scattr
To install Scattr simply run
get https://github.com/gophergala2016/scattr
This will download Scattr to $GOPATH/src/github.com/gophergala2016/scattr
. Now cd to this directory and run
go build
to create scattr
binary. Place this binary somewhere in PATH to install it.
To run scattr simply execute the binary in any folder using the following command-line
attr
Scattr can be run from command-line using the following syntax.
attr -h
e of scattr:
string
listen on Host (default "0.0.0.0")
string
use Configfile (default "config.toml")
int
use port (default 8080)
int
use port for admin interface (default 9090)
string
listen on Host for admin interface (default "0.0.0.0")
for example to run scattr
Sample script to filter the response :
(function(data){
turn data.Url
use the fanout(scattr)page(default "config.toml")
scattr port to listen (default 8080)
bind to ip address (default "0.0.0.0")
admin port to listen (default 9090)
bind to ip address (default "0.0.0.0")
cense