Solomon Hykes
6616f08fe0
inmem: gofmt
...
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-05-16 18:46:23 -07:00
Solomon Hykes
ffa47f5445
inmem: fix the tests
...
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-05-16 18:46:23 -07:00
Solomon Hykes
f22b8f52f3
inmem: Receiver and Sender don't need to implement Close
...
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-05-16 18:46:23 -07:00
Solomon Hykes
91133d63be
inmem: Fix PipeSender to implement ReceiverFrom
...
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-05-16 18:46:23 -07:00
Solomon Hykes
1eb832dcbc
inmem: Copy requires either SenderTo or ReceiverFrom
...
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-05-16 18:46:23 -07:00
Solomon Hykes
3d03104af4
data: expose EncodeList and DecodeList
...
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-05-16 18:46:11 -07:00
Solomon Hykes
0feebd2320
inmem: Implement `Copy`, `ReceiveFrom` and `SendTo`
...
* Copy is the beam equivalent of `io.Copy`
* `ReceiveFrom` is the beam equivalent of `io.ReadFrom`
* `SendTo` is the beam equivalent of `io.WriteTo`
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-05-16 18:44:23 -07:00
Solomon Hykes
a5cb570bfb
inmem: more testing
...
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-05-16 18:44:20 -07:00
Solomon Hykes
338a7d50a8
inmem: fix nested in/out channels in each message
...
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-05-16 18:41:38 -07:00
Solomon Hykes
caa6004064
inmem: use pkg/testutils
...
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-05-16 18:41:21 -07:00
Solomon Hykes
a1ed1ec1fa
inmem: switch to a Sender/Receiver/Pipe interface similar to io.Pipe
...
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-05-16 18:40:31 -07:00
Solomon Hykes
323ebae5f6
Add LICENSE and NOTICE
2014-05-16 17:53:39 -07:00
Solomon Hykes
f887982f22
Update README to explain libswarm
2014-05-16 17:52:06 -07:00
Aanand Prasad
a799e0fe20
Pass HTTP params through when forwarding `containers` job
2014-05-15 14:55:19 +01:00
Aanand Prasad
f6f3cd3181
Copy env when creating job in catchall
2014-05-15 14:55:03 +01:00
Solomon Hykes
c0364720db
beam: no target field yet
2014-05-09 21:00:46 -07:00
Solomon Hykes
3725628467
Beam in-mem: an in-memory implementation of Beam
2014-05-09 21:00:46 -07:00
Solomon Hykes
2c9e18009f
Fix stdin handling in engine.Sender and engine.Receiver
...
This introduces a superficial change to the Beam API:
* `beam.SendPipe` is renamed to the more accurate `beam.SendRPipe`
* `beam.SendWPipe` is introduced as a mirror to `SendRPipe`
There is no other change in the beam API.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-05-09 15:39:55 -07:00
Solomon Hykes
e3cf0c416f
Document backends
2014-05-02 16:18:52 -07:00
Solomon Hykes
954e5334f0
Basic forward backend
2014-05-02 12:52:44 -07:00
Solomon Hykes
3aed457ac5
Freeze dependencies with godep
2014-05-01 23:39:13 -07:00
Solomon Hykes
6a6596913a
First skeleton of a simulator
2014-05-01 23:31:06 -07:00
Solomon Hykes
a1b63f4b79
Pass standard streams through between frontend and backend
2014-05-01 23:30:34 -07:00
Solomon Hykes
9acaf7597f
Backends can receive arguments
2014-05-01 18:32:06 -07:00
Solomon Hykes
c22a80a071
Choose a single backend with `--backend`
...
Note: for now there is only one backend available, `debug`
2014-05-01 18:13:55 -07:00
Solomon Hykes
142e43a447
Use codegansta/cli for argument parsing
2014-05-01 17:27:17 -07:00
Solomon Hykes
cb213c5a68
Better error messages
2014-05-01 17:26:46 -07:00
Solomon Hykes
4bdc2407b6
Sleep 1 full second at startup to workaround a race condition in api/server
2014-05-01 17:25:17 -07:00
Solomon Hykes
29df891a2d
Add .gitignore
2014-05-01 16:29:39 -07:00
Solomon Hykes
cd9abab36a
Move call logger to a separate backend (more backends to come)
2014-05-01 16:29:16 -07:00
Solomon Hykes
ca7c1fbf49
Add basic README
2014-05-01 16:21:14 -07:00
Solomon Hykes
f132e3fb03
Initial commit
2014-05-01 16:13:41 -07:00
Alexander Larsson
e9651077fc
beam: Add simple framing system for UnixConn
...
This is needed for Send/Recieve to correctly handle borders between
the messages.
The framing uses a single 32bit uint32 length for each frame, of which
the high bit is used to indicate whether the message contains a file
descriptor or not. This is enough to separate out each message sent
and to decide to which message each file descriptors belongs, even
though multiple Sends may be coalesced into a single read, and/or one
Send can be split into multiple writes.
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-05-01 11:06:01 -07:00
Tianon Gravi
d0b1155e89
Fix various MAINTAINERS format inconsistencies
...
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-04-30 11:22:11 -06:00
Alexander Larsson
00480dcc8c
beam: Add more tests to unix_test.go
...
These are failing, and indicate things that need to be fixed. The
primarily problem is the lack of framing between beam messages.
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
[solomon@docker.com: rebased on master]
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-04-30 02:10:09 -07:00
Solomon Hykes
e1ace86c5a
Fix Go formatting in beam and dockerscript
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 16:16:29 -07:00
Solomon Hykes
2a5908261b
beam/examples/beamsh: 'chdir' changes the current directory
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:24 -07:00
Solomon Hykes
47751cc50e
beam/examples/beamsh: 'exec' can communicate with its child via beam.
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:24 -07:00
Solomon Hykes
d599ab2f65
beam/examples/beamsh: use beam.Router to simplify 'multiprint' and fix job passthrough
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:23 -07:00
Solomon Hykes
d04102e5dd
beam: new routing functions Route.KeyEquals, Route.KeyIncludes, Route.NoKey
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:23 -07:00
Solomon Hykes
8bc15104e2
beam/examples/beamsh: use beam.Router to simplify 'trace'
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:23 -07:00
Solomon Hykes
f84e7624aa
beam/examples/beamsh: move builtins to a separate file for readability
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:23 -07:00
Solomon Hykes
6a727eb78d
beam/examples/beamsh: simplify commands by always creating and sending stdout and stderr for them
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:23 -07:00
Solomon Hykes
cfee34a9a7
beam/examples/beamsh: use beam.Router to simplify 'logger'
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:23 -07:00
Solomon Hykes
e94309f056
beam/examples/beamsh: use beam.Router to simplify the 'stdio' command
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:23 -07:00
Solomon Hykes
0e85dc3423
beam: Router can route beam messages with a convenient set of rules and handlers
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:23 -07:00
Solomon Hykes
b645a78485
beam/examples/beamsh: move example scripts to scripts/
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:22 -07:00
Alexander Larsson
faa83a0fc0
beam: Fix double close of fds in SendUnix
...
Instead of calling syscall.Close() on the fds in sendUnix() we call
Close() on the *os.File in Send(). Otherwise the fd will be closed, but
the *os.File will continue to live, and when it is finalized the
fd will be closed (which by then may be reused and can be anything).
This also adds a note to Send() the the file is closed.
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-04-22 15:50:22 -07:00
Solomon Hykes
80df1aaaaa
beam: more unit tests
...
This adds testing to SendConn.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:22 -07:00
Solomon Hykes
7436d1a9ca
beam/examples/beamsh: add scripts to reproduce various bugs
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:22 -07:00