Commit Graph

4 Commits

Author SHA1 Message Date
Solomon Hykes 7601d49283 Implement NopSender (removed by switch to libchan)
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-06-30 23:15:20 -07:00
Aanand Prasad 1e15a54d0e Port to libchan, pt. 1
This is a minimal effort to get things running. Only the `beam` package
has changed - backend code is untouched.

- The `beam` package is still around, but functions as a
  libswarm-specific wrapper around libchan messages. It'll either be
  renamed or moved to the top-level namespace.

- We have our own Message type which serializes/deserializes to libchan
  messages, and our own versions of Sender and Receiver which speak
  libswarm. WrapSender and WrapReceiver promote libchan objects to
  their libswarm equivalents.

- We also have our own wrappers around libchan utilities: RetPipe,
  Handler, Pipe, Copy.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2014-06-30 23:15:20 -07:00
Solomon Hykes 3265abfa2e Simplify the beam API
* Callback pattern that is easier to grok: each message has an optional nested return channel, instead of 2 nested streams
* Return channel is in the Message structure: less arguments and return values to pass around
* Caller can request a pipe as return channel, or pass its own. This makes proxying and advanced plumbing operations much easier.

Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-06-02 06:15:28 +00:00
Solomon Hykes 91ae1d7353 Merge beam into libswarm
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-06-01 23:49:08 +00:00