Documentation ¶
Index ¶
- Variables
- func FullStateFileName(r *block.Range) string
- func PartialFileName(r *block.Range, traceID string) string
- type Appender
- type ConditionalKeySetter
- type Config
- func (c *Config) FileSize(ctx context.Context, fileInfo *FileInfo) (int64, error)
- func (c *Config) ListSnapshotFiles(ctx context.Context, below uint64) (files []*FileInfo, err error)
- func (c *Config) ModuleHash() string
- func (c *Config) ModuleInitialBlock() uint64
- func (c *Config) Name() string
- func (c *Config) NewFullKV(logger *zap.Logger) *FullKV
- func (c *Config) NewPartialKV(initialBlock uint64, logger *zap.Logger) *PartialKV
- func (c *Config) UpdatePolicy() pbsubstreams.Module_KindStore_UpdatePolicy
- func (c *Config) ValueType() string
- type ConfigMap
- type Deleter
- type DeltaAccessor
- type FileInfo
- type FileInfoParam
- type FileInfos
- type FullKV
- func (b FullKV) Append(ord uint64, key string, value []byte) error
- func (b FullKV) ApplyDelta(delta *pbssinternal.StoreDelta)
- func (b FullKV) ApplyDeltasReverse(deltas []*pbssinternal.StoreDelta)
- func (b FullKV) DeletePrefix(ord uint64, prefix string)
- func (s *FullKV) DerivePartialStore(initialBlock uint64) *PartialKV
- func (b FullKV) GetAt(ord uint64, key string) (out []byte, found bool)
- func (b FullKV) GetDeltas() []*pbssinternal.StoreDelta
- func (b FullKV) GetFirst(key string) ([]byte, bool)
- func (b FullKV) GetLast(key string) ([]byte, bool)
- func (b FullKV) HasAt(ord uint64, key string) bool
- func (b FullKV) HasFirst(key string) bool
- func (b FullKV) HasLast(key string) bool
- func (b FullKV) InitialBlock() uint64
- func (b FullKV) Iter(f func(key string, value []byte) error) error
- func (b FullKV) Length() uint64
- func (s *FullKV) Load(ctx context.Context, file *FileInfo) error
- func (b FullKV) MarshalLogObject(enc zapcore.ObjectEncoder) error
- func (s *FullKV) Marshaller() marshaller.Marshaller
- func (b FullKV) Merge(kvPartialStore *PartialKV) error
- func (b FullKV) Name() string
- func (s *FullKV) Reset()
- func (s *FullKV) Save(endBoundaryBlock uint64) (*FileInfo, *fileWriter, error)
- func (b FullKV) Set(ord uint64, key string, value string)
- func (b FullKV) SetBytes(ord uint64, key string, value []byte)
- func (b FullKV) SetBytesIfNotExists(ord uint64, key string, value []byte)
- func (b FullKV) SetDeltas(deltas []*pbssinternal.StoreDelta)
- func (b FullKV) SetIfNotExists(ord uint64, key string, value string)
- func (b FullKV) SetMaxBigDecimal(ord uint64, key string, value decimal.Decimal)
- func (b FullKV) SetMaxBigInt(ord uint64, key string, value *big.Int)
- func (b FullKV) SetMaxFloat64(ord uint64, key string, value float64)
- func (b FullKV) SetMaxInt64(ord uint64, key string, value int64)
- func (b FullKV) SetMinBigDecimal(ord uint64, key string, value decimal.Decimal)
- func (b FullKV) SetMinBigInt(ord uint64, key string, value *big.Int)
- func (b FullKV) SetMinFloat64(ord uint64, key string, value float64)
- func (b FullKV) SetMinInt64(ord uint64, key string, value int64)
- func (s *FullKV) String() string
- func (b FullKV) SumBigDecimal(ord uint64, key string, value decimal.Decimal)
- func (b FullKV) SumBigInt(ord uint64, key string, value *big.Int)
- func (b FullKV) SumFloat64(ord uint64, key string, value float64)
- func (b FullKV) SumInt64(ord uint64, key string, value int64)
- func (b FullKV) UpdatePolicy() pbsubstreams.Module_KindStore_UpdatePolicy
- func (b FullKV) ValueType() string
- type Getter
- type Iterable
- type Loadable
- type Map
- type MaxBigDecimalSetter
- type MaxBigIntSetter
- type MaxFloat64Setter
- type MaxInt64Setter
- type Mergeable
- type MinBigDecimalSetter
- type MinBigIntSetter
- type MinFloat64Setter
- type MinInt64Setter
- type Named
- type PartialKV
- func (b PartialKV) Append(ord uint64, key string, value []byte) error
- func (b PartialKV) ApplyDelta(delta *pbssinternal.StoreDelta)
- func (b PartialKV) ApplyDeltasReverse(deltas []*pbssinternal.StoreDelta)
- func (p *PartialKV) DeletePrefix(ord uint64, prefix string)
- func (p *PartialKV) DeleteStore(ctx context.Context, file *FileInfo) (err error)
- func (b PartialKV) GetAt(ord uint64, key string) (out []byte, found bool)
- func (b PartialKV) GetDeltas() []*pbssinternal.StoreDelta
- func (b PartialKV) GetFirst(key string) ([]byte, bool)
- func (b PartialKV) GetLast(key string) ([]byte, bool)
- func (b PartialKV) HasAt(ord uint64, key string) bool
- func (b PartialKV) HasFirst(key string) bool
- func (b PartialKV) HasLast(key string) bool
- func (p *PartialKV) InitialBlock() uint64
- func (b PartialKV) Iter(f func(key string, value []byte) error) error
- func (b PartialKV) Length() uint64
- func (p *PartialKV) Load(ctx context.Context, file *FileInfo) error
- func (b PartialKV) MarshalLogObject(enc zapcore.ObjectEncoder) error
- func (b PartialKV) Merge(kvPartialStore *PartialKV) error
- func (b PartialKV) Name() string
- func (b PartialKV) Reset()
- func (p *PartialKV) Roll(lastBlock uint64)
- func (p *PartialKV) Save(endBoundaryBlock uint64) (*FileInfo, *fileWriter, error)
- func (b PartialKV) Set(ord uint64, key string, value string)
- func (b PartialKV) SetBytes(ord uint64, key string, value []byte)
- func (b PartialKV) SetBytesIfNotExists(ord uint64, key string, value []byte)
- func (b PartialKV) SetDeltas(deltas []*pbssinternal.StoreDelta)
- func (b PartialKV) SetIfNotExists(ord uint64, key string, value string)
- func (b PartialKV) SetMaxBigDecimal(ord uint64, key string, value decimal.Decimal)
- func (b PartialKV) SetMaxBigInt(ord uint64, key string, value *big.Int)
- func (b PartialKV) SetMaxFloat64(ord uint64, key string, value float64)
- func (b PartialKV) SetMaxInt64(ord uint64, key string, value int64)
- func (b PartialKV) SetMinBigDecimal(ord uint64, key string, value decimal.Decimal)
- func (b PartialKV) SetMinBigInt(ord uint64, key string, value *big.Int)
- func (b PartialKV) SetMinFloat64(ord uint64, key string, value float64)
- func (b PartialKV) SetMinInt64(ord uint64, key string, value int64)
- func (p *PartialKV) String() string
- func (b PartialKV) SumBigDecimal(ord uint64, key string, value decimal.Decimal)
- func (b PartialKV) SumBigInt(ord uint64, key string, value *big.Int)
- func (b PartialKV) SumFloat64(ord uint64, key string, value float64)
- func (b PartialKV) SumInt64(ord uint64, key string, value int64)
- func (b PartialKV) UpdatePolicy() pbsubstreams.Module_KindStore_UpdatePolicy
- func (b PartialKV) ValueType() string
- type PartialStore
- type Reader
- type Resettable
- type Savable
- type Setter
- type Store
- type SumBigDecimalSetter
- type SumBigIntSetter
- type SumFloat64Setter
- type SumInt64Setter
- type TraceIDParam
- type UpdateKeySetter
Constants ¶
This section is empty.
Variables ¶
var NotFound = errors.New("store not found")
Functions ¶
func FullStateFileName ¶ added in v1.1.3
Types ¶
type ConditionalKeySetter ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) ListSnapshotFiles ¶
func (*Config) ModuleHash ¶
func (*Config) ModuleInitialBlock ¶
func (*Config) NewPartialKV ¶
func (*Config) UpdatePolicy ¶
func (c *Config) UpdatePolicy() pbsubstreams.Module_KindStore_UpdatePolicy
type ConfigMap ¶
func NewConfigMap ¶
func NewConfigMap(baseObjectStore dstore.Store, storeModules []*pbsubstreams.Module, moduleHashes *manifest.ModuleHashes, traceID string) (out ConfigMap, err error)
type DeltaAccessor ¶
type DeltaAccessor interface { SetDeltas([]*pbssinternal.StoreDelta) GetDeltas() []*pbssinternal.StoreDelta ApplyDeltasReverse(deltas []*pbssinternal.StoreDelta) ApplyDelta(delta *pbssinternal.StoreDelta) }
type FileInfo ¶
func CompleteFile ¶ added in v1.1.3
func CompleteFile(in string, params ...FileInfoParam) *FileInfo
CompleteFile returns a FileInfo for the given range, infallibly, panics on errors, ideal for tests.
func NewCompleteFileInfo ¶ added in v1.1.3
func NewPartialFileInfo ¶ added in v1.1.3
func PartialFile ¶ added in v1.1.3
func PartialFile(in string, params ...FileInfoParam) *FileInfo
PartialFile returns a FileInfo for the given range, infallibly, panics on errors, ideal for tests.
type FileInfoParam ¶ added in v1.1.3
type FileInfoParam interface {
// contains filtered or unexported methods
}
type FileInfos ¶ added in v1.1.3
type FileInfos []*FileInfo
func CompleteFiles ¶ added in v1.1.3
func CompleteFiles(in string, params ...FileInfoParam) FileInfos
CompleteFiles returns a list of FileInfo for the given ranges, infallibly, panics on errors, ideal for tests.
func PartialFiles ¶ added in v1.1.3
func PartialFiles(in string, params ...FileInfoParam) FileInfos
PartialFiles returns a list of FileInfo for the given ranges, infallibly, panics on errors, ideal for tests.
type FullKV ¶
type FullKV struct {
// contains filtered or unexported fields
}
func (FullKV) ApplyDelta ¶
func (b FullKV) ApplyDelta(delta *pbssinternal.StoreDelta)
func (FullKV) ApplyDeltasReverse ¶
func (b FullKV) ApplyDeltasReverse(deltas []*pbssinternal.StoreDelta)
func (FullKV) DeletePrefix ¶
func (*FullKV) DerivePartialStore ¶
func (FullKV) GetDeltas ¶
func (b FullKV) GetDeltas() []*pbssinternal.StoreDelta
func (FullKV) HasAt ¶ added in v1.0.0
HasAt returns true if the key exists for the state that includes the processing of `ord`.
func (FullKV) InitialBlock ¶
func (b FullKV) InitialBlock() uint64
func (FullKV) MarshalLogObject ¶
func (b FullKV) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*FullKV) Marshaller ¶
func (s *FullKV) Marshaller() marshaller.Marshaller
func (FullKV) Merge ¶
Merge nextStore _into_ `s`, where nextStore is for the next contiguous segment's store output.
func (*FullKV) Save ¶
Save is to be called ONLY when we just passed the `nextExpectedBoundary` and processed nothing more after that boundary.
func (FullKV) SetBytesIfNotExists ¶
func (FullKV) SetDeltas ¶
func (b FullKV) SetDeltas(deltas []*pbssinternal.StoreDelta)
func (FullKV) SetIfNotExists ¶
func (FullKV) SetMaxBigDecimal ¶
func (FullKV) SetMaxFloat64 ¶
func (FullKV) SetMaxInt64 ¶
func (FullKV) SetMinBigDecimal ¶
func (FullKV) SetMinFloat64 ¶
func (FullKV) SetMinInt64 ¶
func (FullKV) SumBigDecimal ¶
func (FullKV) SumFloat64 ¶
func (FullKV) UpdatePolicy ¶
func (b FullKV) UpdatePolicy() pbsubstreams.Module_KindStore_UpdatePolicy
type Map ¶
func (Map) MarshalLogObject ¶
func (m Map) MarshalLogObject(enc zapcore.ObjectEncoder) error
type MaxBigDecimalSetter ¶
type MaxBigIntSetter ¶
type MaxFloat64Setter ¶
type MaxInt64Setter ¶
type Mergeable ¶
type Mergeable interface { ValueType() string UpdatePolicy() pbsubstreams.Module_KindStore_UpdatePolicy }
type MinBigDecimalSetter ¶
type MinBigIntSetter ¶
type MinFloat64Setter ¶
type MinInt64Setter ¶
type PartialKV ¶
type PartialKV struct { DeletedPrefixes []string // contains filtered or unexported fields }
func (PartialKV) ApplyDelta ¶
func (b PartialKV) ApplyDelta(delta *pbssinternal.StoreDelta)
func (PartialKV) ApplyDeltasReverse ¶
func (b PartialKV) ApplyDeltasReverse(deltas []*pbssinternal.StoreDelta)
func (*PartialKV) DeletePrefix ¶
func (*PartialKV) DeleteStore ¶
func (PartialKV) GetDeltas ¶
func (b PartialKV) GetDeltas() []*pbssinternal.StoreDelta
func (PartialKV) HasAt ¶ added in v1.0.0
HasAt returns true if the key exists for the state that includes the processing of `ord`.
func (*PartialKV) InitialBlock ¶
func (PartialKV) MarshalLogObject ¶
func (b PartialKV) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (PartialKV) Merge ¶
Merge nextStore _into_ `s`, where nextStore is for the next contiguous segment's store output.
func (PartialKV) SetBytesIfNotExists ¶
func (PartialKV) SetDeltas ¶
func (b PartialKV) SetDeltas(deltas []*pbssinternal.StoreDelta)
func (PartialKV) SetIfNotExists ¶
func (PartialKV) SetMaxBigDecimal ¶
func (PartialKV) SetMaxBigInt ¶
func (PartialKV) SetMaxFloat64 ¶
func (PartialKV) SetMaxInt64 ¶
func (PartialKV) SetMinBigDecimal ¶
func (PartialKV) SetMinBigInt ¶
func (PartialKV) SetMinFloat64 ¶
func (PartialKV) SetMinInt64 ¶
func (PartialKV) SumBigDecimal ¶
func (PartialKV) SumFloat64 ¶
func (PartialKV) UpdatePolicy ¶
func (b PartialKV) UpdatePolicy() pbsubstreams.Module_KindStore_UpdatePolicy
type PartialStore ¶
type PartialStore interface {
Roll(lastBlock uint64)
}
type Resettable ¶
type Resettable interface {
Reset()
}
type Store ¶
type Store interface { Name() string InitialBlock() uint64 Loadable Savable Iterable DeltaAccessor Resettable Mergeable Named // intrinsics Reader UpdateKeySetter ConditionalKeySetter Appender Deleter MaxBigIntSetter MaxInt64Setter MaxFloat64Setter MaxBigDecimalSetter MinBigIntSetter MinInt64Setter MinFloat64Setter MinBigDecimalSetter SumBigIntSetter SumInt64Setter SumFloat64Setter SumBigDecimalSetter }
type SumBigDecimalSetter ¶
type SumBigIntSetter ¶
type SumFloat64Setter ¶
type SumInt64Setter ¶
type TraceIDParam ¶ added in v1.1.3
type TraceIDParam string