Commit Graph

20 Commits

Author SHA1 Message Date
Michael Crosby
a8b21da538 Add FifoIO to expose fifos directly to client
This allows clients an easier way to interact with the fifos for a
container without having to use the built in copyIO functions when
opening fifos.

It's nothing that clients could not have already coded but since we use
this type of functionality in the tests it makes sense to add an
implementation here.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-22 14:34:14 -04:00
Lantao Liu
8e2c95f9c1 Change IO to interface.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-14 18:53:12 +00:00
Michael Crosby
eb58ecab7c Add null io option
This adds null IO option for efficient handling of IO.
It provides a container directly with `/dev/null` and does not require
any io.Copy within the shim whenever a user does not want the IO of the
container.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-14 13:09:16 -04:00
Lantao Liu
73735c4dba Cleanup FIFOs on error.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-04 18:58:10 +00:00
Michael Crosby
0a85f6e47d Update godoc for client package
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-04 11:53:31 -04:00
Kenfe-Mickael Laventure
a4aaa09ccc
Update ctr so it works again on windows
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-07-21 18:19:48 +02:00
Kenfe-Mickael Laventure
a5b3038ccc
Fix deadlock when task's exec start fails
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-07-14 21:54:30 +02:00
Michael Crosby
96b041e1f9 Close io when Start fails
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-12 10:37:39 -07:00
Stephen J Day
d738d6d1e4
containerd: rename FifoSet to FIFOSet
Per Go's style guidelines, `Fifo` should be `FIFO` since it is an
initialism.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-30 14:16:56 -07:00
Michael Crosby
887a149417 Add terminal support
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-01 14:46:14 -07:00
Michael Crosby
00734ab04a Return fifo paths from Shim
This allows attach of existing fifos to be done without any information
stored on the client side.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-01 14:12:02 -07:00
Michael Crosby
43fb19e01c Add Load for container and Task with Attach
This adds both container and task loading of running tasks as well as
reattaching to the IO of the task after load.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-01 14:12:02 -07:00
Michael Crosby
9890bed1e1 Add CloseStdin to task
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-01 14:10:04 -07:00
Derek McGowan
b1a45c2aee
Fix windows build for client
Move io copy logic from ctr utils to io_windows.go.
Fix compilation errors on Windows.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-05-30 16:57:34 -07:00
Michael Crosby
b3f891b09f Add integration tests for running containers
Add travis support for running integration tests with the client package
and go test framework

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-26 15:50:01 -07:00
Alexander Morozov
69f8f566a2 Move supervisor to it's own package
It allows to keep main namespace cleaner

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-12-17 16:18:48 -08:00
Tonis Tiigi
ae5c752449 Close stdin after data has been copied
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-17 13:42:08 -08:00
Michael Crosby
d542ece69c Add tty support from client
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-14 16:47:42 -08:00
Michael Crosby
92c0790899 Add stdin support for client and daemon
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-14 14:40:50 -08:00
Michael Crosby
e9f63fc9a4 Add basic fifo support for IO copy
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-14 14:15:26 -08:00