Commit Graph

4 Commits

Author SHA1 Message Date
Solomon Hykes b9c316df29 inmem: complete Copy implementation
Copy can now handle arbitrary nesting of streams, without knowing the
underlying type of either the source or destination.

It does this by attempting `SendTo` and `ReceiveFrom`, then if that is
not supported, falling back to nested copies in separate goroutines.

Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-05-16 18:48:13 -07:00
Solomon Hykes 6616f08fe0 inmem: gofmt
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 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