Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

21-adaptorconfig #22

Merged
merged 2 commits into from
Dec 22, 2014
Merged

21-adaptorconfig #22

merged 2 commits into from
Dec 22, 2014

Conversation

nstott
Copy link
Contributor

@nstott nstott commented Dec 22, 2014

This expands on the adaptors registry, to include both a constructor and a config struct for each adaptor.
The registry is exposed, and the config structs are inspectable. the struct fields in the config are tagged with a doc string doc:"doc string".
a new command is added to the utility in to query these configs. transporter about

transporter about
influx               an InfluxDB sink adaptor
transformer          an adaptor that transforms documents using a javascript function
mongo                a mongodb adaptor that functions as both a source and a sink
file                 an adaptor that reads / writes files
elasticsearch        an elasticsearch sink adaptor

and transporter about mongo

transporter about mongo
name            type       description
uri             string     the uri to connect to, in the form mongodb://user:password@host.com:27017/auth_database
namespace       string     mongo namespace to read/write
debug           bool       display debug information
tail            bool       if tail is true, then the mongodb source will tail the oplog after copying the namespace

In order to normalize the way these configs are passed in the application.js, the transformers now take a hash and not a straight string
where once we had:
Source({name:"foofile"}).transform({"transformers/passthrough_and_log.js").save({name:"errorfile"})
now we have
Source({name:"foofile"}).transform({filename: "transformers/passthrough_and_log.js"}).save({name:"errorfile"})

This is a breaking change, and the version has been bumped to 0.0.2

…ags to define docstrings. added a new transporter command, 'about'
… Sink. This is a breaking change, application.js files will need to be updated
@jipperinbham
Copy link
Contributor

👍

nstott added a commit that referenced this pull request Dec 22, 2014
@nstott nstott merged commit 5e77ba2 into master Dec 22, 2014
@nstott nstott deleted the 21-adaptorconfig branch December 22, 2014 15:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants