Skip to content

Commit

Permalink
Send Dispatch ID with RunRequest (#24)
Browse files Browse the repository at this point in the history
When function calls a dispatched through a
[`DispatchService`](https://github.com/stealthrocket/dispatch-proto/blob/a1473bffb1c77a4c4f5bc86d7661045f0450a85c/dispatch/sdk/v1/dispatch.proto#L10),
the service returns a
[`dispatch_id`](https://github.com/stealthrocket/dispatch-proto/blob/a1473bffb1c77a4c4f5bc86d7661045f0450a85c/dispatch/sdk/v1/dispatch.proto#L54)
for each call.

This identifier is never shown again to the user; they have no way of
knowing which requests correspond to that function call.

This PR resolves the issue by attaching the same `dispatch_id` to each
`RunRequest`.
  • Loading branch information
chriso authored Apr 17, 2024
2 parents a1473bf + f0e3698 commit 167bd36
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dispatch/sdk/v1/function.proto
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ message RunRequest {
// set of results for operations that have completed.
PollResult poll_result = 3;
}

// Opaque identifier for the function call.
//
// It's the same value as the Dispatch ID that was returned when the call
// was dispatched (on DispatchResponse).
string dispatch_id = 4;
}

// RunResponse is returned by calls to the Run method of FunctionService.
Expand Down

0 comments on commit 167bd36

Please sign in to comment.