cic-chain-events/internal/store/store.go
Mohammed Sohail df88d9df16
refactor: perf, update libraries ci, and add docs
* update config to better defaults
* add docs, inline and md
* add context support throughout
* replace json with goccy/go-json for better decoding of large JSON
* update graphql fetcher: replace ioutil with io
* test runner script (until CI is ready)
* update CI build config
2023-01-11 08:13:59 +00:00

12 lines
548 B
Go

package store
import "context"
// Store defines all relevant get/set queries against the implemented storage backend.
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)
}