Commit Graph

5 Commits

Author SHA1 Message Date
Solomon Hykes d95b9728e8 beam: encode Verb in an enum instead of a string
Signed-off-bu: Solomon Hykes <solomon@docker.com>
2014-06-05 07:02:21 +00:00
Solomon Hykes 91c9eec591 Break down beam plumbing into smaller, simpler files
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-06-05 06:00:50 +00:00
Solomon Hykes 1b22a97f19 First version of an object model
* beam.Verb enumerates all standard verbs
* beam.Object implements standard verbs as convenience client methods
* beam.Server implements stateless handlers to process incoming standard verbs
* beam.Repeater always replies with the same message
* beam.Handler exposes a function as a Receiver

Standard verbs include:

* Object navigation: ls, attach
* Execution: spawn, start, stop
* Notifications: log, error, ack
* Data: set, get

Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-06-03 00:06:36 +00: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