Skip to content
This repository was archived by the owner on Jun 2, 2020. It is now read-only.

Commit 0ed5169

Browse files
authored
Merge pull request #452 from peterhuene/durable-functions
Merge the Durable Functions implementation to dev.
2 parents 1ef5152 + 1e9e507 commit 0ed5169

File tree

134 files changed

+6448
-982
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+6448
-982
lines changed

Cargo.lock

Lines changed: 743 additions & 332 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
members = [
44
"azure-functions",
55
"azure-functions-codegen",
6+
"azure-functions-durable",
67
"azure-functions-sdk",
78
"azure-functions-shared",
89
"azure-functions-shared-codegen",
@@ -19,4 +20,5 @@ members = [
1920
"examples/twilio",
2021
"examples/sendgrid",
2122
"examples/generic",
23+
"examples/durable-functions",
2224
]

README.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub fn greet(req: HttpRequest) -> HttpResponse {
5252
}
5353
```
5454

55-
Azure Functions for Rust supports [async](https://rust-lang.github.io/rfcs/2394-async_await.html) functions when compiled with a nightly compiler and with the `unstable` feature enabled:
55+
Azure Functions for Rust also supports [async](https://rust-lang.github.io/async-book/01_getting_started/04_async_await_primer.html) functions:
5656

5757
```rust
5858
use azure_functions::{
@@ -185,16 +185,13 @@ To build with support for async Azure Functions, add the following to your `Carg
185185

186186
```toml
187187
[dependencies]
188-
futures-preview = { version = "0.3.0-alpha.17", optional = true }
189-
190-
[features]
191-
unstable = ["azure-functions/unstable", "futures-preview"]
188+
futures-preview = "0.3.0-alpha.19"
192189
```
193190

194-
And then build with the `unstable` feature:
191+
And then build:
195192

196193
```bash
197-
cargo build --features unstable
194+
cargo build
198195
```
199196

200197
## Running the Azure Functions application
@@ -268,31 +265,34 @@ The `#[func]` attribute is used to turn an ordinary Rust function into an Azure
268265

269266
The current list of supported bindings:
270267

271-
| Rust Type | Azure Functions Binding | Direction | Vec\<T> |
272-
|----------------------------------------------------------------------------------------------------------------------------|-------------------------------------|----------------|---------|
273-
| [Blob](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.Blob.html) | Input and Ouput Blob | in, inout, out | No |
274-
| [BlobTrigger](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.BlobTrigger.html) | Blob Trigger | in, inout | No |
275-
| [CosmosDbDocument](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.CosmosDbDocument.html) | Input and Output Cosmos DB Document | in, out | Yes |
276-
| [CosmosDbTrigger](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.CosmosDbTrigger.html) | Cosmos DB Trigger | in | No |
277-
| [EventGridEvent](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.EventGridEvent.html) | Event Grid Trigger | in | No |
278-
| [EventHubMessage](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.EventHubMessage.html) | Event Hub Output Message | out | Yes |
279-
| [EventHubTrigger](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.EventHubTrigger.html) | Event Hub Trigger | in | No |
280-
| [GenericInput](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.GenericInput.html) | Generic Input | in | No |
281-
| [GenericOutput](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.GenericOutput.html) | Generic Output | out | No |
282-
| [GenericTrigger](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.GenericTrigger.html) | Generic Trigger | in | No |
283-
| [HttpRequest](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.HttpRequest.html) | HTTP Trigger | in | No |
284-
| [HttpResponse](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.HttpResponse.html) | Output HTTP Response | out | No |
285-
| [QueueMessage](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.QueueMessage.html) | Output Queue Message | out | Yes |
286-
| [QueueTrigger](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.QueueTrigger.html) | Queue Trigger | in | No |
287-
| [SendGridMessage](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.SendGridMessage.html) | SendGrid Email Message | out | Yes |
288-
| [ServiceBusMessage](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.ServiceBusMessage.html) | Service Bus Output Message | out | Yes |
289-
| [ServiceBusTrigger](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.ServiceBusTrigger.html) | Service Bus Trigger | in | No |
290-
| [SignalRConnectionInfo](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.SignalRConnectionInfo.html) | SignalR Connection Info | in | No |
291-
| [SignalRGroupAction](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.SignalRGroupAction.html) | SignalR Group Action | out | Yes |
292-
| [SignalRMessage](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.SignalRMessage.html) | SignalR Message | out | Yes |
293-
| [Table](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.Table.html) | Input and Ouput Table | in, out | No |
294-
| [TimerInfo](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.TimerInfo.html) | Timer Trigger | in | No |
295-
| [TwilioSmsMessage](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.TwilioSmsMessage.html) | Twilio SMS Message Output | out | Yes | Yes |
268+
| Rust Type | Azure Functions Binding | Direction | Vec\<T> |
269+
|----------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|----------------|---------|
270+
| [Blob](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.Blob.html) | Input and Ouput Blob | in, inout, out | No |
271+
| [BlobTrigger](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.BlobTrigger.html) | Blob Trigger | in, inout | No |
272+
| [CosmosDbDocument](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.CosmosDbDocument.html) | Input and Output Cosmos DB Document | in, out | Yes |
273+
| [CosmosDbTrigger](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.CosmosDbTrigger.html) | Cosmos DB Trigger | in | No |
274+
| [DurableActivityContext](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.DurableActivityContext.html) | Durable Activity Trigger | in | No |
275+
| [DurableOrchestrationClient](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.DurableOrchestrationClient.html) | Durable Orchestration Client | in | No |
276+
| [DurableOrchestrationContext](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.DurableOrchestrationContext.html) | Durable Orchestration Trigger | in | No |
277+
| [EventGridEvent](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.EventGridEvent.html) | Event Grid Trigger | in | No |
278+
| [EventHubMessage](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.EventHubMessage.html) | Event Hub Output Message | out | Yes |
279+
| [EventHubTrigger](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.EventHubTrigger.html) | Event Hub Trigger | in | No |
280+
| [GenericInput](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.GenericInput.html) | Generic Input | in | No |
281+
| [GenericOutput](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.GenericOutput.html) | Generic Output | out | No |
282+
| [GenericTrigger](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.GenericTrigger.html) | Generic Trigger | in | No |
283+
| [HttpRequest](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.HttpRequest.html) | HTTP Trigger | in | No |
284+
| [HttpResponse](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.HttpResponse.html) | Output HTTP Response | out | No |
285+
| [QueueMessage](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.QueueMessage.html) | Output Queue Message | out | Yes |
286+
| [QueueTrigger](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.QueueTrigger.html) | Queue Trigger | in | No |
287+
| [SendGridMessage](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.SendGridMessage.html) | SendGrid Email Message | out | Yes |
288+
| [ServiceBusMessage](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.ServiceBusMessage.html) | Service Bus Output Message | out | Yes |
289+
| [ServiceBusTrigger](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.ServiceBusTrigger.html) | Service Bus Trigger | in | No |
290+
| [SignalRConnectionInfo](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.SignalRConnectionInfo.html) | SignalR Connection Info | in | No |
291+
| [SignalRGroupAction](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.SignalRGroupAction.html) | SignalR Group Action | out | Yes |
292+
| [SignalRMessage](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.SignalRMessage.html) | SignalR Message | out | Yes |
293+
| [Table](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.Table.html) | Input and Ouput Table | in, out | No |
294+
| [TimerInfo](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.TimerInfo.html) | Timer Trigger | in | No |
295+
| [TwilioSmsMessage](https://docs.rs/azure-functions/latest/azure_functions/bindings/struct.TwilioSmsMessage.html) | Twilio SMS Message Output | out | Yes | Yes |
296296

297297
More bindings will be implemented in the future, including support for retreiving data from custom bindings.
298298

0 commit comments

Comments
 (0)