Commit c6bc9ac
committed
feat: recognize the native worker runtime (gRPC durable protocol)
Add WorkerRuntimeType.Native (and Golang) and treat them like the other
gRPC-protocol runtimes (.NET isolated, Java) so Durable Functions works for
the Azure Functions Go worker.
The Go worker runs under the native worker model: its app sets
FUNCTIONS_WORKER_RUNTIME to "native" (see the worker's samples and
TECHNICAL_SPEC), and the worker provider declares "language": "golang". The
durable extension reads FUNCTIONS_WORKER_RUNTIME via GetWorkerRuntimeType,
so it sees "native". Some host builds surface "golang" instead (the worker's
integration tests launch func with FUNCTIONS_WORKER_RUNTIME=golang), so both
values are recognized; both identify the Go native worker, which uses the
gRPC out-of-process protocol exclusively (never the legacy HTTP shim).
- IPlatformInformation: new WorkerRuntimeType.Native and Golang. The host
parses FUNCTIONS_WORKER_RUNTIME via Enum.TryParse(value.Replace("-",""),
ignoreCase), so "native"/"golang" map to these values.
- DurableTaskExtension: select the gRPC (MiddlewarePassthrough) protocol for
Native/Golang, alongside DotNetIsolated/Java/Custom. This routes
orchestrator/activity execution through OutOfProcMiddleware's trigger
dispatch and stands up the local gRPC server the worker's durable client
connects to (delivered to the worker as the DurableClient binding's
rpcBaseUrl). Also mark them as not needing the legacy local HTTP RPC
endpoint.
- AzureStorageDurabilityProviderFactory: include Native/Golang in the set of
runtimes that use a separate queue for entity work items, consistent with
the other gRPC-protocol runtimes.
Execution remains trigger-replay: the host invokes the orchestration/
activity trigger over FunctionRpc with the encoded request and reads the
worker's encoded response, exactly as for .NET isolated and Java. The gRPC
server stays management-only (it does not serve a work-item stream).1 parent 604f45a commit c6bc9ac
3 files changed
Lines changed: 22 additions & 0 deletions
File tree
- src/WebJobs.Extensions.DurableTask
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| |||
262 | 264 | | |
263 | 265 | | |
264 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
265 | 271 | | |
266 | 272 | | |
267 | 273 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
64 | 78 | | |
65 | 79 | | |
66 | 80 | | |
| |||
0 commit comments