execout

package
v1.17.10 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("inputs module value not found")

Functions

This section is empty.

Types

type Buffer

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

Buffer holds the values produced by modules and exchanged between them as a sort of buffer. Here are the types of exec outputs per module type:

               values         valuesForFileOutput
---------------------------------------------------
store:         deltas               kvops
mapper:         data              same data
index:          keys                 --

func NewBuffer

func NewBuffer(blockType string, block *pbbstream.Block, clock *pbsubstreams.Clock) (*Buffer, error)

func (*Buffer) Clock

func (i *Buffer) Clock() *pbsubstreams.Clock

func (*Buffer) Clone added in v1.17.8

func (i *Buffer) Clone() ExecutionOutput

func (*Buffer) Get

func (i *Buffer) Get(moduleName string) (value []byte, cached bool, err error)

func (*Buffer) Len added in v1.4.0

func (i *Buffer) Len() (out int)

func (*Buffer) Set

func (i *Buffer) Set(moduleName string, value []byte) (err error)

func (*Buffer) SetFileOutput added in v1.6.0

func (i *Buffer) SetFileOutput(moduleName string, value []byte) (err error)

type ClockDistributor added in v1.15.8

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

func NewClockDistributor added in v1.15.8

func NewClockDistributor(execOuts map[string]FileReader, startBlock uint64, stopBlock uint64) *ClockDistributor

func (*ClockDistributor) Iter added in v1.15.8

Iter returns an iterator that yields clocks from the distributor. This allows using range loops: for clock, err := range distributor.Iter(ctx) { ... }

func (*ClockDistributor) Next added in v1.15.8

type Config

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

func NewConfig

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

func (*Config) ListSnapshotFiles

func (c *Config) ListSnapshotFiles(ctx context.Context, from uint64, to uint64) (files FileInfos, err error)

func (*Config) ModuleInitialBlock

func (c *Config) ModuleInitialBlock() uint64

func (*Config) ModuleKind

func (c *Config) ModuleKind() pbsubstreams.ModuleKind

func (*Config) Name

func (c *Config) Name() string

func (*Config) NewFile

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

func (*Config) NewFileWriter added in v1.15.8

func (c *Config) NewFileWriter(ctx context.Context, targetRange *block.Range) FileWriter

func (*Config) OpenFileReader added in v1.15.8

func (c *Config) OpenFileReader(ctx context.Context, targetRange *block.Range) (FileReader, error)

func (*Config) WriteDeterministicError added in v1.15.0

func (c *Config) WriteDeterministicError(ctx context.Context, atBlock uint64, err error) error

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 map[string]string, execOutputSaveInterval uint64, firstStreamableBlock uint64, logger *zap.Logger) (*Configs, error)

func WrapConfigs added in v1.13.0

func WrapConfigs(execOutputSaveInterval uint64, logger *zap.Logger, confs ...*Config) *Configs

func (*Configs) NewFile

func (c *Configs) NewFile(moduleName string, targetRange *block.Range) *File

func (*Configs) NewFileWalker added in v1.1.9

func (c *Configs) NewFileWalker(moduleName string, segmenter *block.Segmenter) *FileWalker

type ExecutionOutput

ExecutionOutput gets/sets execution output for a given graph at a given block

type ExecutionOutputCloner added in v1.17.8

type ExecutionOutputCloner interface {
	Clone() ExecutionOutput
}

type ExecutionOutputGetter

type ExecutionOutputGetter interface {
	Len() int
	Clock() *pbsubstreams.Clock
	Get(name string) (value []byte, cached bool, err error)
}

type ExecutionOutputSetter

type ExecutionOutputSetter interface {
	Set(name string, value []byte) (err error)
	SetFileOutput(name string, value []byte) (err error)
}

type File

type File struct {
	*block.Range
	// contains filtered or unexported fields
}

A File in `execout` stores, for a given module (with a given hash), the outputs of module execution for _multiple blocks_, based on their block ID.

func (*File) Filename

func (c *File) Filename() string

func (*File) FullFilename added in v1.9.0

func (c *File) FullFilename() string

func (*File) MarshalLogObject

func (c *File) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*File) ModuleName

func (c *File) ModuleName() string

func (*File) String

func (c *File) String() string

type FileInfo

type FileInfo struct {
	Filename   string
	BlockRange *block.Range
}

type FileInfos

type FileInfos = []*FileInfo

type FileReader added in v1.15.8

type FileReader interface {
	ReadNext() (*pboutput.Item, error)
	Iter() iter.Seq2[*pboutput.Item, error]
	Get(ctx context.Context, blockNumber uint64) (payload []byte, found bool, err error)
	ModuleName() string
	Filename() string
	Close() error
}

func OpenFileReader added in v1.15.8

func OpenFileReader(ctx context.Context, store dstore.Store, logger *zap.Logger, rng *block.Range, moduleName string) (FileReader, error)

type FileWalker added in v1.1.9

type FileWalker struct {
	IsLocal bool
	// contains filtered or unexported fields
}

FileWalker allows you to jump from file to file, from segment to segment

func NewFileWalker added in v1.6.2

func NewFileWalker(c *Config, segmenter *block.Segmenter, logger *zap.Logger) *FileWalker

func (*FileWalker) FileReader added in v1.15.8

func (fw *FileWalker) FileReader(ctx context.Context) (FileReader, error)

If the current segment is out of ranges, returns nil.

func (*FileWalker) FileWriter added in v1.15.8

func (fw *FileWalker) FileWriter(ctx context.Context) FileWriter

If the current segment is out of ranges, returns nil.

func (*FileWalker) IsDone added in v1.1.9

func (fw *FileWalker) IsDone() bool

func (*FileWalker) Next added in v1.1.9

func (fw *FileWalker) Next()

func (*FileWalker) Progress added in v1.3.2

func (fw *FileWalker) Progress() (first, current, last int)

type FileWriter added in v1.15.8

type FileWriter interface {
	SetItem(clock *pbsubstreams.Clock, data []byte) error
	Close() error
	ModuleName() string
	Filename() string
	Range() *block.Range
}

func NewFileWriter added in v1.15.8

func NewFileWriter(ctx context.Context, store dstore.Store, logger *zap.Logger, rng *block.Range, moduleName string) FileWriter

type Writer

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

The Writer writes a single file with executionOutputs that will be read by the LinearExecOutReader. `initialBlockBoundary` is expected to be on a boundary, or to be the module's initial block.

func NewWriter

func NewWriter(ctx context.Context, initialBlockBoundary, exclusiveEndBlock uint64, outputModule string, configs *Configs) *Writer

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) Write

func (w *Writer) Write(clock *pbsubstreams.Clock, buffer *Buffer) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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