aboutsummaryrefslogtreecommitdiff
path: root/keyserver/api
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-07-30 14:52:21 +0100
committerGitHub <noreply@github.com>2020-07-30 14:52:21 +0100
commita2174d3294841dbdf201bde76de3ffc44399fcbc (patch)
tree64f5c0d7dee038960941a937dd84631d53c1e9a9 /keyserver/api
parent9355fb5ac8c911bdbde6dcc0f279f716d8a8f60b (diff)
Implement /keys/changes (#1232)
* Implement /keys/changes And refactor QueryKeyChanges to accept a `to` offset. * Unbreak tests * Sort keys when serialising log tokens
Diffstat (limited to 'keyserver/api')
-rw-r--r--keyserver/api/api.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/keyserver/api/api.go b/keyserver/api/api.go
index c9afb09c..98bcd944 100644
--- a/keyserver/api/api.go
+++ b/keyserver/api/api.go
@@ -138,6 +138,9 @@ type QueryKeyChangesRequest struct {
Partition int32
// The offset of the last received key event, or sarama.OffsetOldest if this is from the beginning
Offset int64
+ // The inclusive offset where to track key changes up to. Messages with this offset are included in the response.
+ // Use sarama.OffsetNewest if the offset is unknown (then check the response Offset to avoid racing).
+ ToOffset int64
}
type QueryKeyChangesResponse struct {