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 BuilderOption
- type ConditionalKeySetter
- type Deleter
- type FileInfo
- type Info
- type MaxBigFloatSetter
- type MaxBigIntSetter
- type MaxFloat64Setter
- type MaxInt64Setter
- type Mergeable
- type MinBigFloatSetter
- type MinBigIntSetter
- type MinFloat64Setter
- type MinInt64Setter
- type Reader
- type Store
- func (b *Store) ApplyDelta(delta *pbsubstreams.StoreDelta)
- func (b *Store) CloneStructure(newStoreStartBlock uint64) *Store
- func (b *Store) Del(ord uint64, key string)
- func (b *Store) DeletePrefix(ord uint64, prefix string)
- func (b *Store) DeleteStore(ctx context.Context, exclusiveEndBlock uint64) error
- func (s *Store) Fetch(ctx context.Context, exclusiveEndBlock uint64) error
- func (b *Store) Flush()
- func (b *Store) GetAt(ord uint64, key string) (out []byte, found bool)
- func (b *Store) GetFirst(key string) ([]byte, bool)
- func (b *Store) GetLast(key string) ([]byte, bool)
- func (b *Store) Info(ctx context.Context) (*Info, error)
- func (s *Store) IsPartial() bool
- func (b *Store) LoadFrom(ctx context.Context, blockRange *block.Range) (*Store, error)
- func (b *Store) MarshalLogObject(enc zapcore.ObjectEncoder) error
- func (into *Store) Merge(builder *Store) error
- func (b *Store) Print()
- func (b *Store) PrintDelta(delta *pbsubstreams.StoreDelta)
- func (b *Store) Roll(lastBlock uint64)
- func (b *Store) Set(ord uint64, key string, value string)
- func (b *Store) SetBytes(ord uint64, key string, value []byte)
- func (b *Store) SetBytesIfNotExists(ord uint64, key string, value []byte)
- func (b *Store) SetIfNotExists(ord uint64, key string, value string)
- func (b *Store) SetMaxBigFloat(ord uint64, key string, value *big.Float)
- func (b *Store) SetMaxBigInt(ord uint64, key string, value *big.Int)
- func (b *Store) SetMaxFloat64(ord uint64, key string, value float64)
- func (b *Store) SetMaxInt64(ord uint64, key string, value int64)
- func (b *Store) SetMinBigFloat(ord uint64, key string, value *big.Float)
- func (b *Store) SetMinBigInt(ord uint64, key string, value *big.Int)
- func (b *Store) SetMinFloat64(ord uint64, key string, value float64)
- func (b *Store) SetMinInt64(ord uint64, key string, value int64)
- func (b *Store) SumBigFloat(ord uint64, key string, value *big.Float)
- func (b *Store) SumBigInt(ord uint64, key string, value *big.Int)
- func (b *Store) SumFloat64(ord uint64, key string, value float64)
- func (b *Store) SumInt64(ord uint64, key string, value int64)
- func (b *Store) Truncate()
- func (b *Store) WriteState(ctx context.Context, lastBlock uint64) (err error)
- type SumBigFloatSetter
- type SumBigIntSetter
- type SumFloat64Setter
- type SumInt64Setter
- type UpdateKeySetter
Constants ¶
View Source
const ( OutputValueTypeInt64 = "int64" OutputValueTypeFloat64 = "float64" OutputValueTypeBigInt = "bigint" OutputValueTypeBigFloat = "bigfloat" OutputValueTypeString = "string" )
Variables ¶
This section is empty.
Functions ¶
func FullStateFilePrefix ¶
func InfoFileName ¶
func InfoFileName() string
func PartialFileName ¶
Types ¶
type BuilderOption ¶
type BuilderOption func(b *Store)
type ConditionalKeySetter ¶
type FileInfo ¶
func ParseFileName ¶
type MaxBigFloatSetter ¶
type MaxBigIntSetter ¶
type MaxFloat64Setter ¶
type MaxInt64Setter ¶
type MinBigFloatSetter ¶
type MinBigIntSetter ¶
type MinFloat64Setter ¶
type MinInt64Setter ¶
type Store ¶
type Store struct { Name string Store dstore.Store SaveInterval uint64 Initialized bool ModuleInitialBlock uint64 StoreInitialBlock uint64 // block at which we initialized this store ProcessedBlock uint64 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 // contains filtered or unexported fields }
func NewBuilder ¶
func NewBuilder(name string, saveInterval uint64, moduleInitialBlock uint64, moduleHash string, updatePolicy pbsubstreams.Module_KindStore_UpdatePolicy, valueType string, store dstore.Store, opts ...BuilderOption) (*Store, error)
func (*Store) ApplyDelta ¶
func (b *Store) ApplyDelta(delta *pbsubstreams.StoreDelta)
func (*Store) CloneStructure ¶
func (*Store) DeletePrefix ¶
func (*Store) DeleteStore ¶
func (*Store) MarshalLogObject ¶
func (b *Store) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*Store) PrintDelta ¶
func (b *Store) PrintDelta(delta *pbsubstreams.StoreDelta)
func (*Store) SetBytesIfNotExists ¶
func (*Store) SetMaxBigFloat ¶
func (*Store) SetMinBigFloat ¶
type SumBigFloatSetter ¶
type SumBigIntSetter ¶
type SumFloat64Setter ¶
type SumInt64Setter ¶
Click to show internal directories.
Click to hide internal directories.