8000 Drivers · griffordson/cocaine-core Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Kobolog edited this page Apr 30, 2012 · 13 revisions

Driver Types

Timers

There're two simple types of timers available for now — recurring-timer and drifting-timer. The only difference is that the drifting timer will not start another job if the previous one is not yet completed, even though the time is right.

Arguments

  • interval, milliseconds - time between job invocations.

Filesystem Monitor

The filesystem-monitor will watch for changes in the specified path in the best possible way on your platform and trigger the job when such changes happen (new or deleted file, file changes, etc.)

Arguments

  • path, string - filesystem location to watch.

Native Server and Sink

TBD.

ZeroMQ Server and Sink

The zeromq-server and zeromq-sink will listen on the specified port for requests and trigger new jobs, pushing the received data into the slaves. The difference between server and sink is that sink doesn't send any responses back to the clients or even imply their presence, so it's a good way to build pipelines.

Request format

No magic here, send your messages the normal way you do when using ZeroMQ. The only feature is that if you send a multipart message, it will be treated as a bulk request, triggering a new job for every message part.

Arguments

  • endpoint, string - ZeroMQ-specific connection string, for example, tcp://*:6000 or ipc:///var/run/sink. If omitted, the server will assign an endpoint automatically.
  • backlog, positive integer - maximum number of outstanding connections waiting to be accepted on the socket. Default value is 1000.
  • linger, milliseconds - how much time to wait on server termination for the outstanding responses to be sent to the clients. Default value is 0, which means that all the outstanding responses should be dropped immediately.
Clone this wiki locally
0