Fix comments

This commit is contained in:
Neil Alexander 2022-02-04 12:47:53 +00:00
parent 4acf2a05dd
commit 2e071ea3ba
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 3 additions and 3 deletions

View file

@ -228,7 +228,7 @@ type QueryKeyChangesRequest struct {
// The offset of the last received key event, or sarama.OffsetOldest if this is from the beginning // The offset of the last received key event, or sarama.OffsetOldest if this is from the beginning
Offset int64 Offset int64
// The inclusive offset where to track key changes up to. Messages with this offset are included in the response. // The inclusive offset where to track key changes up to. Messages with this offset are included in the response.
// Use jetstream.OffsetNewest if the offset is unknown (then check the response Offset to avoid racing). // Use types.OffsetNewest if the offset is unknown (then check the response Offset to avoid racing).
ToOffset int64 ToOffset int64
} }

View file

@ -68,7 +68,7 @@ type Database interface {
StoreKeyChange(ctx context.Context, userID string) (int64, error) StoreKeyChange(ctx context.Context, userID string) (int64, error)
// KeyChanges returns a list of user IDs who have modified their keys from the offset given (exclusive) to the offset given (inclusive). // KeyChanges returns a list of user IDs who have modified their keys from the offset given (exclusive) to the offset given (inclusive).
// A to offset of jetstream.OffsetNewest means no upper limit. // A to offset of types.OffsetNewest means no upper limit.
// Returns the offset of the latest key change. // Returns the offset of the latest key change.
KeyChanges(ctx context.Context, fromOffset, toOffset int64) (userIDs []string, latestOffset int64, err error) KeyChanges(ctx context.Context, fromOffset, toOffset int64) (userIDs []string, latestOffset int64, err error)

View file

@ -46,7 +46,7 @@ type DeviceKeys interface {
type KeyChanges interface { type KeyChanges interface {
InsertKeyChange(ctx context.Context, userID string) (int64, error) InsertKeyChange(ctx context.Context, userID string) (int64, error)
// SelectKeyChanges returns the set (de-duplicated) of users who have changed their keys between the two offsets. // SelectKeyChanges returns the set (de-duplicated) of users who have changed their keys between the two offsets.
// Results are exclusive of fromOffset and inclusive of toOffset. A toOffset of jetstream.OffsetNewest means no upper offset. // Results are exclusive of fromOffset and inclusive of toOffset. A toOffset of types.OffsetNewest means no upper offset.
SelectKeyChanges(ctx context.Context, fromOffset, toOffset int64) (userIDs []string, latestOffset int64, err error) SelectKeyChanges(ctx context.Context, fromOffset, toOffset int64) (userIDs []string, latestOffset int64, err error)
Prepare() error Prepare() error