Documentation ¶
Index ¶
- Constants
- func FindNextUnindexed(ctx context.Context, startBlockNum uint64, possibleIndexSizes []uint64, ...) (next uint64)
- func NewBlockIndex(lowBlockNum, indexSize uint64) *blockIndex
- func NewTestBlockIndex(lowBlockNum, indexSize uint64, kv map[string]*roaring64.Bitmap) *blockIndex
- func ReadNewBlockIndex(r io.ReadCloser) (*blockIndex, error)
- type BitmapGetter
- type BlockIndexer
- type BlockMetadata
- type Factory
- type GenericBlockIndexProvider
- type Input
- type InputObj
- type NilObj
- type Option
- type Output
- type PreprocessTransform
- type Registry
- type Transform
Constants ¶
const (
NilObjectType string = "nil"
)
Variables ¶
This section is empty.
Functions ¶
func FindNextUnindexed ¶
func NewBlockIndex ¶
func NewBlockIndex(lowBlockNum, indexSize uint64) *blockIndex
NewBlockIndex initializes and returns a new BlockIndex
func NewTestBlockIndex ¶
func ReadNewBlockIndex ¶
func ReadNewBlockIndex(r io.ReadCloser) (*blockIndex, error)
ReadNewBlockIndex returns a new BlockIndex from a io.ReadCloser it does not set the lowBlockNum an indexSize
Types ¶
type BitmapGetter ¶
type BlockIndexer ¶
type BlockIndexer struct {
// contains filtered or unexported fields
}
BlockIndexer creates and performs I/O operations on index files
func NewBlockIndexer ¶
func NewBlockIndexer(store dstore.Store, indexSize uint64, indexShortname string, opts ...Option) *BlockIndexer
NewBlockIndexer initializes and returns a new BlockIndexer
func (*BlockIndexer) Add ¶
func (i *BlockIndexer) Add(keys []string, blockNum uint64)
Add will populate the BlockIndexer's currentIndex by adding the specified BlockNum to the bitmaps identified with the provided keys
func (*BlockIndexer) String ¶
func (i *BlockIndexer) String() string
String returns a summary of the current BlockIndexer
type BlockMetadata ¶
type GenericBlockIndexProvider ¶
GenericBlockIndexProvider responds to queries on BlockIndex
func NewGenericBlockIndexProvider ¶
func NewGenericBlockIndexProvider( store dstore.Store, indexShortname string, possibleIndexSizes []uint64, filterFunc func(BitmapGetter) []uint64, ) *GenericBlockIndexProvider
NewGenericBlockIndexProvider initializes and returns a new GenericBlockIndexProvider
func (*GenericBlockIndexProvider) BlocksInRange ¶
func (ip *GenericBlockIndexProvider) BlocksInRange(baseBlock, bundleSize uint64) (out []uint64, err error)
type Option ¶
type Option func(*BlockIndexer)
func WithDefinedStartBlock ¶
func WithMaxAttempts ¶
func WithOpsTimeout ¶
type PreprocessTransform ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) BuildFromTransforms ¶
func (r *Registry) BuildFromTransforms(anyTransforms []*anypb.Any) ( bstream.PreprocessFunc, bstream.BlockIndexProvider, string, error, )
BuildFromTransforms returns a PreprocessFunc, an optional BlockIndexProvider, a human-readable description and an error It will fail if it receives a transform of type Passthrough or a transform that does not match any interface