Documentation ¶
Index ¶
- Variables
- type Buffer
- type Config
- func (c *Config) ListSnapshotFiles(ctx context.Context, inRange *bstream.Range) (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) ReadFile(ctx context.Context, inrange *block.Range) (*File, error)
- type Configs
- type ExecutionOutput
- type ExecutionOutputGetter
- type ExecutionOutputSetter
- type File
- func (c *File) ExtractClocks(clocksMap map[uint64]*pbsubstreams.Clock)
- func (c *File) Filename() string
- func (c *File) Get(clock *pbsubstreams.Clock) ([]byte, bool)
- func (c *File) GetAtBlock(blockNumber uint64) ([]byte, bool)
- func (c *File) Load(ctx context.Context) error
- func (c *File) MarshalLogObject(enc zapcore.ObjectEncoder) error
- func (c *File) Save(ctx context.Context) error
- func (c *File) SetItem(clock *pbsubstreams.Clock, data []byte)
- func (c *File) SortedItems() (out []*pboutput.Item)
- func (c *File) String() string
- type FileInfo
- type FileInfos
- type FileWalker
- 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
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
type Configs ¶
func NewConfigs ¶
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 }
ExecutionOutput gets/sets execution output for a given graph at a given block
type ExecutionOutputGetter ¶
type ExecutionOutputSetter ¶
type File ¶
type File struct { sync.RWMutex *block.Range ModuleName string Kv map[string]*pboutput.Item // 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) ExtractClocks ¶ added in v1.5.3
func (c *File) ExtractClocks(clocksMap map[uint64]*pbsubstreams.Clock)
func (*File) MarshalLogObject ¶
func (c *File) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*File) SortedItems ¶
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) File ¶ added in v1.1.9
func (fw *FileWalker) File() *File
File returns the current segment's file. 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) PreloadNext ¶ added in v1.6.0
func (fw *FileWalker) PreloadNext(ctx context.Context)
PreloadNext loads the next file in the background so the consumer doesn't wait between each file. This affects maximum throughput
func (*FileWalker) Progress ¶ added in v1.3.2
func (fw *FileWalker) Progress() (first, current, last int)
type Writer ¶
type Writer struct { CurrentFile *File // 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.