@@ -82,22 +82,46 @@ message CancelRequest {
8282message CancelResponse {
8383}
8484
85- // StatusRequest defines a request to look up the current status of a previously submitted request.
86- message StatusRequest {
87- // Globally unique identifier for the request, as returned by Land in the LandResponse .
85+ // RequestSummary is the gateway-owned materialized current view of one received request.
86+ message RequestSummary {
87+ // Globally unique request identifier. This is request_id in internal storage .
8888 string sqid = 1 ;
89+ // Queue supplied when the request was received.
90+ string queue = 2 ;
91+ // Change URIs supplied when the request was received, in caller order.
92+ repeated string change_uris = 3 ;
93+ // Receipt time in Unix milliseconds.
94+ int64 received_at_ms = 4 ;
95+ // Current customer-friendly status of the request.
96+ string status = 5 ;
97+ // Last error associated with the current status. Empty when absent.
98+ string last_error = 6 ;
99+ // Display and debugging metadata associated with the current status.
100+ map <string , string > metadata = 7 ;
101+ }
102+
103+ // StatusByIDRequest selects one request by the sqid returned from Land.
104+ message StatusByIDRequest {
105+ // Globally unique identifier for the request.
106+ string sqid = 1 ;
107+ }
108+
109+ // StatusByIDResponse contains the current materialized request view.
110+ message StatusByIDResponse {
111+ // Matching request.
112+ RequestSummary request = 1 ;
113+ }
114+
115+ // StatusByChangeIDRequest selects requests by an exact pinned change URI.
116+ message StatusByChangeIDRequest {
117+ // Exact change URI supplied in a Land request.
118+ string change_id = 1 ;
89119}
90120
91- // StatusResponse defines the response to a status request.
92- // The status is eventually consistent with the request store; it might take some time to converge, typically no more than a few seconds.
93- message StatusResponse {
94- // Current customer-friendly status of the request (e.g. "accepted", "validating", "landed", "error").
95- // Status is a free-form string because the system may introduce new statuses without breaking existing clients.
96- string status = 1 ;
97- // Last error message associated with the current status. Empty string if there is no error.
98- string last_error = 2 ;
99- // Free-form key-value metadata associated with the current status, for display or debugging purposes. Empty if none.
100- map <string , string > metadata = 3 ;
121+ // StatusByChangeIDResponse contains matching requests newest first.
122+ message StatusByChangeIDResponse {
123+ // Matching requests ordered by receipt time descending, then sqid descending.
124+ repeated RequestSummary requests = 1 ;
101125}
102126
103127// ***************
@@ -124,6 +148,8 @@ message RequestNotFoundError {
124148 Error error = 1 ;
125149 // The sqid that was not found.
126150 string sqid = 2 ;
151+ // Exact change ID that was not found. Populated only for change-ID lookup.
152+ string change_id = 3 ;
127153}
128154
129155// ***************
@@ -152,7 +178,10 @@ service SubmitQueueGateway {
152178 // error) must be checked through the separate status / request-log API.
153179 rpc Cancel (CancelRequest ) returns (CancelResponse ) {}
154180
155- // Status returns the current status of a previously submitted request, identified by its sqid.
156- // The status is eventually consistent with the request store and reconciled from the append-only request log.
157- rpc Status (StatusRequest ) returns (StatusResponse ) {}
181+ // StatusByID returns the current materialized status of one request.
182+ rpc StatusByID (StatusByIDRequest ) returns (StatusByIDResponse ) {}
183+
184+ // StatusByChangeID returns current materialized statuses for an exact pinned change URI.
185+ rpc StatusByChangeID (StatusByChangeIDRequest ) returns (StatusByChangeIDResponse ) {}
186+
158187}
0 commit comments