Skip to content

Commit

Permalink
Add Nexus-Operation-Id header (#20)
Browse files Browse the repository at this point in the history
* Add Nexus-Operation-Id header

* Add OPERATION_START_TIME
  • Loading branch information
Quinn-With-Two-Ns authored Nov 22, 2024
1 parent aa04b96 commit 81a782d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions nexus-sdk/src/main/java/io/nexusrpc/Header.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,19 @@ public class Header {
*/
public static final String OPERATION_TIMEOUT = "Operation-Timeout";

/**
* Header for the unique ID returned by the StartOperation response for async operations. Must be
* set on callback headers to support completing operations before the start response is received.
*/
public static final String OPERATION_ID = "Nexus-Operation-Id";

/**
* Header for to set time the operation started. Used when a completion request is received before
* a started response. Should be in a valid HTTP/1.1 format per
* https://www.rfc-editor.org/rfc/rfc5322.html#section-3.3. If is omitted, the time the completion
* is received will be used as operation start time.
*/
public static final String OPERATION_START_TIME = "Nexus-Operation-Start-Time";

private Header() {}
}

0 comments on commit 81a782d

Please # to comment.