From 14cb1dad57e51c2af51830b31b0628dc2466d55b Mon Sep 17 00:00:00 2001 From: Nodar Date: Wed, 19 Jul 2023 15:42:34 +0200 Subject: [PATCH] Add QueueStorage documentation --- arbnode/dataposter/data_poster.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arbnode/dataposter/data_poster.go b/arbnode/dataposter/data_poster.go index bf2725a063..b06b4b2cb3 100644 --- a/arbnode/dataposter/data_poster.go +++ b/arbnode/dataposter/data_poster.go @@ -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 {