nginxinc / ngx-rust

Rust binding for NGINX
Apache License 2.0
731 stars 60 forks source link

Add Event timers #33

Open f5yacobucci opened 1 year ago

f5yacobucci commented 1 year ago

Is your feature request related to a problem? Please describe. While working on a retry module it became clear there was no facility to schedule actions for the future. NGINX supports timers via the event API. Exposing event timers can be useful to a variety of use cases: repetitive actions outside of I/O events, timeouts for I/O events, or one shot condition checks.

Describe the solution you'd like Expose an idiomatic Rust API for NGINX ngx_event_t types. The first set of APIs required is to expose timers. A proposal for this work is here and is generally complete, but needs to be broken apart from other features (subrequest updates).

This issue should start with the existing branch and only pull over the necessary Event timer API.