summaryrefslogtreecommitdiffstats
path: root/src/errors.rs
AgeCommit message (Collapse)Author
2021-04-27Display error message for `Error::Fault` (#292)Clemens Winter
2021-04-07Allow uppercase acronyms for Error::IOWojciech Kępka
2021-03-08Split up lib.rsEli W. Hunter
2020-07-23Async/Await Support (continuation of #191) (#229)Eli W. Hunter
* it builds! * remove unused dependencies * bump dependencies * reimplement 'exec' endpoint * update a few more examples * update remaining examples * fix doc tests, remove unused 'read' module * remove feature-gated async closures * split futures dependency to just 'futures-util' * update version and readme * make functions accepting Body generic over Into<Body> again * update changelog * reinstate 'unix-socket' feature * reinstate 'attach' endpoint * fix clippy lints * fix documentation typo * fix container copyfrom/into implementations * add convenience methods for TtyChunk struct * remove 'main' from code example to silence clippy lint * Update hyper to 0.13.1 * Add Send bounds to TtyWriter * Appease clippy * Fix examples * Update issue in changelog Co-authored-by: Daniel Eades <danieleades@hotmail.com> Co-authored-by: Marc Schreiber <marc.schreiber@aixigo.de>
2020-03-19Update errors to match current Error trait (#223)Colvin Wellborn
- `description` is deprecated, and now with the 1.42 stable release these are generating warnings - `cause` is deprecated and replaced by `source`
2019-12-26Re-export hyper::Uri as shiplift::Uri (#209)Thomas Eizinger
This patch removes the explicit dependency on the http crate and instead accesses the re-exported version of hyper. This should make the update process slightly easier because those versions would need to be kept in sync manually. We also re-export hyper::Uri as shiplift::Uri because it is part of the public API of shiplift::Docker. This allows users to access the Uri type without having to seperately depend on http or hyper.
2019-09-15Use 'dyn' since trait objects without an explicit 'dyn' are deprecated (#194)Atul Bhosale
2018-12-24fill in error details (#142)doug tangren
2018-12-24update to 2018 edition (#141)doug tangren
* update to 2018 edition * remove more externs * bump version
2018-12-23update travis build (#140)doug tangren
* update travis build * notes on fmting * remove quotes * comment below * rouge quote * first host.port usage * fix deprecation warning
2018-12-22Support interactive stdin/stdout streams (#136)Dylan McKay
* Support interactive stdin/stdout streams This adds support for streaming stdin, stderr, and stdout independently to a running container. The underlying API is futures-based, meaning the code is implemented asynchronously. A synchronous API is also exposed, which is implemented by simply waiting on the asynchronous API futures. This also modifies the existing Tty logic so that the storage type of the data is a Vec<u8> rather than a String. This is also how the Rust standard library persists data from the standard streams. In my particular application, I'm using stdin/stdout as the communication method between a container a host application. In it, a byte-based protocol is used. Streaming works by performing a TCP upgrade; upgrading a higher-level HTTP connection to a lower-level TCP byte stream upon agreement with the server. Docker will automatically upgrade HTTP container log requests to TCP byte streams of a custom std{in,out,err} multiplexing protocol if the client requests it with the 'Connection: Upgrade' header. * Return an error rather than panic when Docker refuses to upgrade to TCP * Add interpret-as-string accessors to tty::Chunk Also updates the examples to use them.
2018-11-14Async api (#128)Antoine Büsch
* Refactored Transport for better async use Still a bit rough, but it now builds a big future using combinators. It still does one `Runtime::block_on()` to keep the existing API, but this is a first up before making the whole API async. * Migrate most APIs to be Future-based I still need to finish a few of the more tricky ones that I've commented out for now, but most of it compiles and some examples work. In particular, `Docker::stats()` now properly returns an async stream of stats. * Fix events and containerinspect examples * Fix imageinspect, images, info and top examples * Fix containercreate, imagedelete and imagepull examples * Fix more examples * Add back debug statement in Transport::request * De-glob imports in examples * Remove unused imports in examples * Fix NetworkCreateOptions serialization * Add back error message extraction in Transport * Fix Container::create serialization of options * Add containerdelete example * Simplify result * Fix some error handling to remove unwrap() * Fix Image::export() * Fix imagebuild example * Add adapter from Stream of Chunks to AsyncRead Having an `AsyncRead` is required to be able to use the `FramedRead` and `Decoder` stuff from tokio_codec. This code is "borrowed" from https:/github.com/ferristseng/rust-ipfs-api though should probably be moved to its own crate or to tokio_codec. * Fix Container::logs() It now properly demuxes stdout/stderr, and returns a `Stream<Item = TtyLine>`. * Fix Container::export() * Use LineCodec for streaming JSON Although in my limited testing it seemed to work fine, there is no guarantee that 1 chunk == 1 piece of valid JSON. However, each JSON structure seems to be serialized on one line, so use LineCodec to turn the body into a stream of lines, then deserialize over this. * Fix serialization of ExecContainerOptions * Fix Container::exec() (kind of...) * Simplify deserialisation in Image::delete() * Small clean-ups * More clean ups * Fix rustdoc + remove extraneous "extern crate" * Fix doc example * Fix formatting
2018-10-10fix a number of clippy warnings (#122)doug tangren
2018-10-08try to get a consistent and repeatable codestyle goingsoftprops
2018-10-01Migrate to serde_jsonAntoine Büsch
2018-08-07Update to Hyper 0.12Dylan McKay
2017-09-09code style enforcementsoftprops
2017-06-25apply rustfmtsoftprops
2017-06-25replace all uses of try with ?. fixes #42softprops
2016-12-27Implement the standard Error traitRoey Darwish Dror
Implementing the standard Error trait allow composing the library error together with frameworks such as error-chain
2016-01-03container create should following the same pattern as other methods that ↵softprops
take options
2016-01-03rustfmtsoftprops
2016-01-03less unwrappingsoftprops
2016-01-03better error repsoftprops