mirror of
https://github.com/grassrootseconomics/cic-chain-events.git
synced 2024-12-23 03:57:31 +01:00
Mohammed Sohail
df88d9df16
* 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
12 lines
548 B
Go
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)
|
|
}
|