Skip to content

Commit

Permalink
Add QueueStorage documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
anodar committed Jul 19, 2023
1 parent 91a8843 commit 14cb1da
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arbnode/dataposter/data_poster.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,11 @@ type queuedTransaction[Meta any] struct {
NextReplacement time.Time
}

// Implements queue-alike storage that can
// - Insert item at specified index
// - Update item with the condition that existing value equals assumed value
// - Delete all the items up to specified index (prune)
// - Calculate length
// Note: one of the implementation of this interface (Redis storage) does not
// support duplicate values.
type QueueStorage[Item any] interface {
Expand Down

0 comments on commit 14cb1da

Please sign in to comment.