Skip to content

Conversation

@jpoyau
Copy link

@jpoyau jpoyau commented Mar 8, 2012

Add code it implement pull/push replication. It implements a service that allows a node to push it data through couchdb replication to any couchdb database. To pull data from any node that implements this service one needs to do a post to<node_url>/push_to the following data:

{
   "destination_database_url": "<url>",  //couchdb target database url required
   "include_exclude"': true/false,
   "filter": // array of filter rules optional
         [
              {"filter_key":"string", // REGEX that matches names in the
                                            // resource data description
                                            // required
              "filter_value": "string" // REGEX that matches values in the
                                            // resource data description
                                            // optional, if not present, any value matches
                }
         ],
   "predicate": "function(doc){... return true;}" // javascript predicate function that takes a 
                                                                // doc and return true or false optional
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant