Documentation
¶
Index ¶
- Variables
- type Buffer
- func (i *Buffer) Clock() *pbsubstreams.Clock
- func (i *Buffer) Clone() ExecutionOutput
- func (i *Buffer) Get(moduleName string) (value []byte, cached bool, err error)
- func (i *Buffer) Len() (out int)
- func (i *Buffer) Set(moduleName string, value []byte) (err error)
- func (i *Buffer) SetFileOutput(moduleName string, value []byte) (err error)
- type ClockDistributor
- type Config
- func (c *Config) ListSnapshotFiles(ctx context.Context, from uint64, to uint64) (files FileInfos, err error)
- func (c *Config) ModuleInitialBlock() uint64
- func (c *Config) ModuleKind() pbsubstreams.ModuleKind
- func (c *Config) Name() string
- func (c *Config) NewFile(targetRange *block.Range) *File
- func (c *Config) NewFileWriter(ctx context.Context, targetRange *block.Range) FileWriter
- func (c *Config) OpenFileReader(ctx context.Context, targetRange *block.Range) (FileReader, error)
- func (c *Config) WriteDeterministicError(ctx context.Context, atBlock uint64, err error) error
- type Configs
- type ExecutionOutput
- type ExecutionOutputCloner
- type ExecutionOutputGetter
- type ExecutionOutputSetter
- type File
- type FileInfo
- type FileInfos
- type FileReader
- type FileWalker
- type FileWriter
- type Writer
Constants ¶
This section is empty.
Variables ¶
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 (*Buffer) Clock ¶
func (i *Buffer) Clock() *pbsubstreams.Clock
func (*Buffer) Clone ¶ added in v1.17.8
func (i *Buffer) Clone() ExecutionOutput
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
func (cd *ClockDistributor) Iter(ctx context.Context) iter.Seq2[*pbsubstreams.Clock, error]
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
func (cd *ClockDistributor) Next(ctx context.Context) (*pbsubstreams.Clock, error)
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) ListSnapshotFiles ¶
func (*Config) ModuleInitialBlock ¶
func (*Config) ModuleKind ¶
func (c *Config) ModuleKind() pbsubstreams.ModuleKind
func (*Config) NewFileWriter ¶ added in v1.15.8
func (*Config) OpenFileReader ¶ added in v1.15.8
type Configs ¶
func NewConfigs ¶
func WrapConfigs ¶ added in v1.13.0
func (*Configs) NewFileWalker ¶ added in v1.1.9
func (c *Configs) NewFileWalker(moduleName string, segmenter *block.Segmenter) *FileWalker
type ExecutionOutput ¶
type ExecutionOutput interface {
ExecutionOutputGetter
ExecutionOutputSetter
ExecutionOutputCloner
}
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 ExecutionOutputSetter ¶
type File ¶
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) FullFilename ¶ added in v1.9.0
func (*File) MarshalLogObject ¶
func (c *File) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*File) ModuleName ¶
type FileReader ¶ added in v1.15.8
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 (*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 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.