Documentation
¶
Index ¶
- Constants
- func FullStateFileName(r *block.Range, moduleStartBlock uint64) string
- func FullStateFilePrefix(blockNum uint64) string
- func InfoFileName() string
- func PartialFileName(r *block.Range) string
- type Builder
- func (b *Builder) ApplyDelta(delta *pbsubstreams.StoreDelta)
- func (b *Builder) Del(ord uint64, key string)
- func (b *Builder) DeletePartialFile(ctx context.Context) error
- func (b *Builder) DeletePrefix(ord uint64, prefix string)
- func (b *Builder) Flush()
- func (b *Builder) FromBlockRange(blockRange *block.Range, partialMode bool) *Builder
- func (b *Builder) GetAt(ord uint64, key string) (out []byte, found bool)
- func (b *Builder) GetFirst(key string) ([]byte, bool)
- func (b *Builder) GetLast(key string) ([]byte, bool)
- func (b *Builder) Info(ctx context.Context) (*Info, error)
- func (b *Builder) Initialize(ctx context.Context, requestedStartBlock uint64, ...) error
- func (b *Builder) InitializePartial(ctx context.Context, startBlock uint64) error
- func (b *Builder) MarshalLogObject(enc zapcore.ObjectEncoder) error
- func (into *Builder) Merge(builder *Builder) error
- func (b *Builder) Print()
- func (b *Builder) PrintDelta(delta *pbsubstreams.StoreDelta)
- func (b *Builder) Roll()
- func (b *Builder) RollPartial()
- func (b *Builder) Set(ord uint64, key string, value string)
- func (b *Builder) SetBytes(ord uint64, key string, value []byte)
- func (b *Builder) SetBytesIfNotExists(ord uint64, key string, value []byte)
- func (b *Builder) SetIfNotExists(ord uint64, key string, value string)
- func (b *Builder) SetMaxBigFloat(ord uint64, key string, value *big.Float)
- func (b *Builder) SetMaxBigInt(ord uint64, key string, value *big.Int)
- func (b *Builder) SetMaxFloat64(ord uint64, key string, value float64)
- func (b *Builder) SetMaxInt64(ord uint64, key string, value int64)
- func (b *Builder) SetMinBigFloat(ord uint64, key string, value *big.Float)
- func (b *Builder) SetMinBigInt(ord uint64, key string, value *big.Int)
- func (b *Builder) SetMinFloat64(ord uint64, key string, value float64)
- func (b *Builder) SetMinInt64(ord uint64, key string, value int64)
- func (b *Builder) SumBigFloat(ord uint64, key string, value *big.Float)
- func (b *Builder) SumBigInt(ord uint64, key string, value *big.Int)
- func (b *Builder) SumFloat64(ord uint64, key string, value float64)
- func (b *Builder) SumInt64(ord uint64, key string, value int64)
- func (b *Builder) WriteState(ctx context.Context) (err error)
- type BuilderOption
- type ConditionalKeySetter
- type Deleter
- type FileInfo
- type FileWaiter
- type Info
- type MaxBigFloatSetter
- type MaxBigIntSetter
- type MaxFloat64Setter
- type MaxInt64Setter
- type Mergeable
- type MinBigFloatSetter
- type MinBigIntSetter
- type MinFloat64Setter
- type MinInt64Setter
- type Reader
- type SumBigFloatSetter
- type SumBigIntSetter
- type SumFloat64Setter
- type SumInt64Setter
- type UpdateKeySetter
Constants ¶
View Source
const ( OutputValueTypeInt64 = "int64" OutputValueTypeFloat64 = "float64" OutputValueTypeBigInt = "bigInt" OutputValueTypeBigFloat = "bigFloat" OutputValueTypeString = "string" )
View Source
const WaiterSleepInterval = 5 * time.Second
Variables ¶
This section is empty.
Functions ¶
func FullStateFilePrefix ¶
func InfoFileName ¶
func InfoFileName() string
func PartialFileName ¶
Types ¶
type Builder ¶
type Builder struct {
Name string
Store dstore.Store
SaveInterval uint64
Initialized bool
ModuleStartBlock uint64
BlockRange *block.Range
ModuleHash string
KV map[string][]byte // KV is the state, and assumes all Deltas were already applied to it.
Deltas []*pbsubstreams.StoreDelta // Deltas are always deltas for the given block.
DeletedPrefixes []string
UpdatePolicy pbsubstreams.Module_KindStore_UpdatePolicy
ValueType string
PartialMode bool
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(name string, saveInterval uint64, moduleStartBlock uint64, moduleHash string, updatePolicy pbsubstreams.Module_KindStore_UpdatePolicy, valueType string, store dstore.Store, opts ...BuilderOption) (*Builder, error)
func (*Builder) ApplyDelta ¶
func (b *Builder) ApplyDelta(delta *pbsubstreams.StoreDelta)
func (*Builder) DeletePrefix ¶
func (*Builder) FromBlockRange ¶
func (*Builder) Initialize ¶
func (*Builder) InitializePartial ¶
func (*Builder) MarshalLogObject ¶
func (b *Builder) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*Builder) PrintDelta ¶
func (b *Builder) PrintDelta(delta *pbsubstreams.StoreDelta)
func (*Builder) RollPartial ¶
func (b *Builder) RollPartial()
func (*Builder) SetBytesIfNotExists ¶
func (*Builder) SetIfNotExists ¶
func (*Builder) SetMaxBigFloat ¶
func (*Builder) SetMaxBigInt ¶
func (*Builder) SetMaxFloat64 ¶
func (*Builder) SetMinBigFloat ¶
func (*Builder) SetMinBigInt ¶
func (*Builder) SetMinFloat64 ¶
func (*Builder) SumBigFloat ¶
type BuilderOption ¶
type BuilderOption func(b *Builder)
type ConditionalKeySetter ¶
type FileInfo ¶
func ParseFileName ¶
type FileWaiter ¶
type FileWaiter struct {
// contains filtered or unexported fields
}
func NewFileWaiter ¶
func NewFileWaiter(targetStartBlock uint64, builders []*Builder) *FileWaiter
type MaxBigFloatSetter ¶
type MaxBigIntSetter ¶
type MaxFloat64Setter ¶
type MaxInt64Setter ¶
type MinBigFloatSetter ¶
type MinBigIntSetter ¶
type MinFloat64Setter ¶
type MinInt64Setter ¶
type SumBigFloatSetter ¶
type SumBigIntSetter ¶
type SumFloat64Setter ¶
type SumInt64Setter ¶
Click to show internal directories.
Click to hide internal directories.