This commit fixes the Durable Function tests on Windows where `Utc::now` has a
lower resolution that's required for an inequality check.
This simply adds a monotonic number of nanoseconds to the current timestamp for
each history event created for the tests.
This commit implements `DurableOrchestrationContext.wait_for_event`.
Additionally, it fully implements `DurableOrchestrationClient` to expose all of
the underlying durable `Client` functions.
This commit implements `DurableOrchestrationContext.set_custom_status`.
It also refactors the examples to break the `hello_world` example into a `join`
and `select` example function.
This fixes the binding name change for the orchestration client when using
Durable Functions 2.0.
Also fixes Ctrl-C handling for `cargo func run` so that a 3.0 Azure Functions
Core Tools can properly shutdown gracefully.
This commit implements the `continue_as_new` method for
`DurableOrchestrationContext`.
The `continue_as_new` method enables looping in orchestration functions.
This commit removes the need for using the "unstable" feature for async/await
support.
Additionally, this moves to a std::future::Future based Tokio and replaces
tower-grpc with tonic (a gRPC implementation that is based on
std::future::Future).
This commit implements the `call_activity_with_retry` method.
It refactors the code to return `ActionFuture` rather than `impl Future`. This
will allow the `join_all` and `select_all` methods to use a mix of
`call_activity` and `call_activity_with_retry`, which is not possible if both
methods return `impl Future`.
This commit implements the `select_all` function on
`DurableOrchestrationContext`.
The function can be used to select from multiple futures, returning the ready
future's output, the index from the original sequence, and the remaining
pending futures.
Additionally, the orchestration state now properly moves to the correct
orchestration started / completed events when handling the resolution of a
future.
This commit continues the Durable Functions implementation:
* Changes `azure-functions-durable` crate to use the released version of the
`hyper` crate, but with the 0.1.0 futures-compatibility layer. This fixes the
issue where the reactor could not be found for the client with a 0.1.0
futures-based tokio reactor that is being used by the Azure Functions for Rust
runtime.
* Implement the `DurableOrchestrationClient` binding to wrap an
`OrchestrationClient` and provide the `start_new` method. More methods will be
implemented later.
* Implement the `DurableActivityContext` binding to extract the instance
identifier and input from the binding data.
* Implemented a mechanism for outer orchestration futures to control inner
futures for updating the current orchestration event, which should occur
immediately after the future is ready.
* Implemented proper replay detection.
* Implemented the `join_all` method on `DurableOrchestrationContext`.
* Implemented the Durable Functions example (still needs documentation).
* Various clippy and code clean up fixes.
- Initializes current_time field with the first OrchestrationStarted event in the constructor.
- Updates current_time field with the next OrchestrationStarted in history.