index

package
v1.10.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertIndexesMapToBytes

func ConvertIndexesMapToBytes(indices map[string]*roaring64.Bitmap) (map[string][]byte, error)

func GenerateBlockIndexWriters

func GenerateBlockIndexWriters(ctx context.Context, baseStore dstore.Store, indexModules []*pbsubstreams.Module, ModuleHashes *manifest.ModuleHashes, logger *zap.Logger, blockRange *block.Range, bundleSize uint64) (writers map[string]*Writer, existingIndices map[string]map[string]*roaring64.Bitmap, err error)

GenrateBlockIndexWriters will only generate writers for modules that have no preexisting index file and that are aligned with the bundle size

Types

type BlockIndex

type BlockIndex struct {
	IndexModule string
	// contains filtered or unexported fields
}

func NewBlockIndex

func NewBlockIndex(expression sqe.Expression, indexModule string, bitmap *roaring64.Bitmap) *BlockIndex

func (*BlockIndex) ExcludesAllBlocks

func (bi *BlockIndex) ExcludesAllBlocks() bool

func (*BlockIndex) Precomputed

func (bi *BlockIndex) Precomputed() bool

func (*BlockIndex) Skip

func (bi *BlockIndex) Skip(blk uint64) bool

func (*BlockIndex) SkipFromKeys

func (bi *BlockIndex) SkipFromKeys(indexedKeys []byte) bool

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(name string, moduleInitialBlock uint64, moduleHash string, baseStore dstore.Store, logger *zap.Logger) (*Config, error)

func (*Config) NewFile

func (c *Config) NewFile(targetRange *block.Range) *File

type Configs

type Configs struct {
	ConfigMap map[string]*Config
	// contains filtered or unexported fields
}

func NewConfigs

func NewConfigs(baseObjectStore dstore.Store, allRequestedModules []*pbsubstreams.Module, moduleHashes *manifest.ModuleHashes, firstStreamableBlock uint64, logger *zap.Logger) (*Configs, error)

type File

type File struct {
	Indices map[string]*roaring64.Bitmap
	// contains filtered or unexported fields
}

func NewFile

func NewFile(baseStore dstore.Store, moduleHash string, moduleName string, logger *zap.Logger, blockRange *block.Range) (*File, error)

func (*File) Filename

func (f *File) Filename() string

func (*File) Load

func (f *File) Load(ctx context.Context) error

func (*File) Print

func (f *File) Print()

func (*File) Save

func (f *File) Save(ctx context.Context) error

func (*File) Set

func (f *File) Set(indices map[string]*roaring64.Bitmap)

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(indexFile *File) *Writer

func (*Writer) Close

func (w *Writer) Close(ctx context.Context) error

func (*Writer) Write

func (w *Writer) Write(indexes map[string]*roaring64.Bitmap)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL