-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement CreateHttpManagementPayload API in Durable Worker Extension (…
…#2929) * initial commit * add comment * add test * update by comment * add httpmanagementpayload class * re-arrange if section to make code more readable * remove unnecessary exception catch * add nullable check at HttpManagementPayload * add nullable check * Add comment as suggested * Update FunctionsDurableTaskClientTests.cs * update a typo as I found this at my e2e test
- Loading branch information
Showing
7 changed files
with
233 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/WebJobs.Extensions.DurableTask/Microsoft.Azure.WebJobs.Extensions.DurableTask.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
// This is a copy of: https://github.com/Azure/azure-functions-durable-extension/blob/dev/src/WebJobs.Extensions.DurableTask/HttpManagementPayload.cs | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Newtonsoft.Json; | ||
|
||
namespace Microsoft.Azure.Functions.Worker; | ||
|
||
/// <summary> | ||
/// Data structure containing status, terminate and send external event HTTP endpoints. | ||
/// </summary> | ||
public class HttpManagementPayload | ||
{ | ||
/// <summary> | ||
/// Gets the ID of the orchestration instance. | ||
/// </summary> | ||
/// <value> | ||
/// The ID of the orchestration instance. | ||
/// </value> | ||
[JsonProperty("id")] | ||
public string? Id { get; internal set; } | ||
|
||
/// <summary> | ||
/// Gets the HTTP GET status query endpoint URL. | ||
/// </summary> | ||
/// <value> | ||
/// The HTTP URL for fetching the instance status. | ||
/// </value> | ||
[JsonProperty("statusQueryGetUri")] | ||
public string? StatusQueryGetUri { get; internal set; } | ||
|
||
/// <summary> | ||
/// Gets the HTTP POST external event sending endpoint URL. | ||
/// </summary> | ||
/// <value> | ||
/// The HTTP URL for posting external event notifications. | ||
/// </value> | ||
[JsonProperty("sendEventPostUri")] | ||
public string? SendEventPostUri { get; internal set; } | ||
|
||
/// <summary> | ||
/// Gets the HTTP POST instance termination endpoint. | ||
/// </summary> | ||
/// <value> | ||
/// The HTTP URL for posting instance termination commands. | ||
/// </value> | ||
[JsonProperty("terminatePostUri")] | ||
public string? TerminatePostUri { get; internal set; } | ||
|
||
/// <summary> | ||
/// Gets the HTTP POST instance rewind endpoint. | ||
/// </summary> | ||
/// <value> | ||
/// The HTTP URL for rewinding orchestration instances. | ||
/// </value> | ||
[JsonProperty("rewindPostUri")] | ||
public string? RewindPostUri { get; internal set; } | ||
|
||
/// <summary> | ||
/// Gets the HTTP DELETE purge instance history by instance ID endpoint. | ||
/// </summary> | ||
/// <value> | ||
/// The HTTP URL for purging instance history by instance ID. | ||
/// </value> | ||
[JsonProperty("purgeHistoryDeleteUri")] | ||
public string? PurgeHistoryDeleteUri { get; internal set; } | ||
|
||
/// <summary> | ||
/// Gets the HTTP POST instance restart endpoint. | ||
/// </summary> | ||
/// <value> | ||
/// The HTTP URL for restarting an orchestration instance. | ||
/// </value> | ||
[JsonProperty("restartPostUri")] | ||
public string? RestartPostUri { get; internal set; } | ||
|
||
/// <summary> | ||
/// Gets the HTTP POST instance suspend endpoint. | ||
/// </summary> | ||
/// <value> | ||
/// The HTTP URL for suspending an orchestration instance. | ||
/// </value> | ||
[JsonProperty("suspendPostUri")] | ||
public string? SuspendPostUri { get; internal set; } | ||
|
||
/// <summary> | ||
/// Gets the HTTP POST instance resume endpoint. | ||
/// </summary> | ||
/// <value> | ||
/// The HTTP URL for resuming an orchestration instance. | ||
/// </value> | ||
[JsonProperty("resumePostUri")] | ||
public string? ResumePostUri { get; internal set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters