cic-chain-events/internal/store/store.go

12 lines
548 B
Go
Raw Permalink Normal View History

2023-01-05 12:45:09 +01:00
package store
import "context"
// Store defines all relevant get/set queries against the implemented storage backend.
2023-01-05 12:45:09 +01:00
type Store[T any] interface {
GetSearchBounds(ctx context.Context, batchSize uint64, headCursor uint64, headBlockLag uint64) (lowerBound uint64, upperBound uint64, err error)
GetMissingBlocks(ctx context.Context, lowerBound uint64, upperBound uint64) (missingBlocksIterable T, err error)
SetSearchLowerBound(ctx context.Context, newLowerBound uint64) (err error)
CommitBlock(ctx context.Context, block uint64) (err error)
2023-01-05 12:45:09 +01:00
}