Adds `TimeAmount.init(string:)` and `TimeAmount.description` for parsing
time amounts from strings and pretty printing them.
Closes#2504.
### Motivation:
Had a minute, wanted to work on Swift-NIO a bit more, and saw @weissi
still wanted this.
### Modifications:
It's largely based on the snippet @weissi made in #2504 with a few
changes:
- Added unit tests.
- Added support for more unit aliases for convenience based on
@glbrntt's suggestion.
- Changed `.gitignore` to ignore `.build` everywhere, I've got a few of
them when testing locally.
### Open questions:
- I originally thought perhaps I should add support for multiple number
and unit pairs, i.e. `1h 31m`, but decided against it. Feels like an
edge case. Happy to add this if you think it's needed.
---------
Co-authored-by: Cory Benfield <lukasa@apple.com>
Motivation:
The tooling around the allocation counter tests is pretty opaque and
also not easy to use.
Modifications:
Document what interested folks should know.
Result:
More people will be able to debug allocations in SwiftNIO.
Co-Authored-By: Cory Benfield <lukasa@apple.com>
motivation: calling syncShutdownGracefully on the event loop can lead to deadlock
changes: assert before calling syncShutdownGracefully that no eventloop context exists
Motivation:
A number of users have asked for the ability to install SwiftNIO
via Cocoapods. This is an entirely reasonable request, so let's
do it.
Modifications:
- Added a script that can generate, and optionally upload,
podspecs.
- Made a slight modification to the dependency script to provide
target-specific dependencies.
Result:
Users can use cocoapods if they prefer.
motivation: publish api docs via gh-pages
changes:
* update generate_docs script to install required dependencies, perform sourcekitten index and commit the docs when running in CI
* create a rio pipeline to run docs generation script
* Docker work
- New image based on xenial.
- Simplified workflow with docker-compose
- Update the readme with docker-compose section
- Move docker related stuff to a dedicated folder
* Add a gen-cert.sh to the container image
* Document certificate generation and how to test all sample servers