2023-01-05 12:45:09 +01:00
|
|
|
package store
|
|
|
|
|
2023-01-11 09:13:59 +01:00
|
|
|
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 {
|
2023-01-11 09:13:59 +01:00
|
|
|
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
|
|
|
}
|