mockersf / jenkins-api.rs

Rust client for Jenkins API
MIT License
26 stars 17 forks source link

Feature: async request support #74

Open kesyog opened 3 years ago

kesyog commented 3 years ago

Have you considered adding support for async requests?

I'd be happy to take a stab at a patch if there were interest. I'm imagining the async API's and types would be gated behind an optional async feature flag.

mockersf commented 3 years ago

I would be happy to review that PR 👍

I mostly used this for a CLI so never took the time to go async...

kesyog commented 3 years ago

I haven't figured out how to add async support in a way I felt great about 😞

I considered simply adding an async version of Jenkins and async versions of all the API's that use it, but I think it'd end up pretty much just doubling the API surface of the entire crate. And doing the necessary refactoring to avoid rampant code duplication under the hood while avoiding making breaking API changes would be a bit unwieldy.

If someone else sees a less naive way of doing it, please chime in and feel free to take over.

mockersf commented 3 years ago

thanks for trying!