Documentation
¶
Index ¶
- Constants
- Variables
- func FilePrefix(storeName string, endBlockNum uint64) string
- func PartialFileName(storeName string, startBlockNum, endBlockNum uint64) string
- func StateFileName(storeName string, startBlockNum, endBlockNum uint64) string
- func StateFilePrefix(storeName string, blockNum uint64) string
- func WaitKV(ctx context.Context, storeName string, store dstore.Store, ...) <-chan error
- func WaitPartial(ctx context.Context, storeName string, store dstore.Store, ...) <-chan error
- type Builder
- func (b *Builder) Del(ord uint64, key string)
- func (b *Builder) DeletePrefix(ord uint64, prefix string)
- func (b *Builder) Flush()
- 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) Merge(previous *Builder) error
- func (b *Builder) Print()
- func (b *Builder) PrintDelta(delta *pbsubstreams.StoreDelta)
- func (b *Builder) ReadState(ctx context.Context, requestedStartBlock uint64) error
- 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) Squash(ctx context.Context, baseStore dstore.Store, upToBlock uint64) error
- 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, blockNum uint64, partialMode bool) (filename string, err error)
- type BuilderOption
- type ConditionalKeySetter
- type Deleter
- type FileInfo
- type FileWaiter
- type MaxBigFloatSetter
- type MaxBigIntSetter
- type MaxFloat64Setter
- type MaxInt64Setter
- type Mergeable
- type MinBigFloatSetter
- type MinBigIntSetter
- type MinFloat64Setter
- type MinInt64Setter
- type Reader
- type Store
- func (s *Store) PartialFileName(startBlockNum, endBlockNum uint64) string
- func (s *Store) StateFileName(blockNum uint64) string
- func (s *Store) StateFilePrefix(blockNum uint64) string
- func (s *Store) WritePartialState(ctx context.Context, content []byte, startBlockNum, endBlockNum uint64) (string, error)
- func (s *Store) WriteState(ctx context.Context, content []byte, blockNum uint64) (string, 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" )
View Source
const WaiterSleepInterval = 5 * time.Second
Variables ¶
View Source
var NotFound = errors.New("state key not found")
Functions ¶
func FilePrefix ¶
func PartialFileName ¶
func StateFileName ¶
func StateFilePrefix ¶
Types ¶
type Builder ¶
type Builder struct { Name string Store *Store ModuleStartBlock 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 // contains filtered or unexported fields }
func BuilderFromFile ¶
func NewBuilder ¶
func NewBuilder(name string, moduleStartBlock uint64, updatePolicy pbsubstreams.Module_KindStore_UpdatePolicy, valueType string, store *Store, opts ...BuilderOption) *Builder
func (*Builder) DeletePrefix ¶
func (*Builder) PrintDelta ¶
func (b *Builder) PrintDelta(delta *pbsubstreams.StoreDelta)
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)
func WithPartialMode ¶
func WithPartialMode(startBlock uint64) BuilderOption
type ConditionalKeySetter ¶
type FileInfo ¶
func ParseFileName ¶
type FileWaiter ¶
type FileWaiter struct {
// contains filtered or unexported fields
}
func NewFileWaiter ¶
func NewFileWaiter(targetStartBlock uint64, stores []*Store) *FileWaiter
type MaxBigFloatSetter ¶
type MaxBigIntSetter ¶
type MaxFloat64Setter ¶
type MaxInt64Setter ¶
type MinBigFloatSetter ¶
type MinBigIntSetter ¶
type MinFloat64Setter ¶
type MinInt64Setter ¶
type Store ¶
func (*Store) PartialFileName ¶
func (*Store) StateFileName ¶
func (*Store) StateFilePrefix ¶
func (*Store) WritePartialState ¶
type SumBigFloatSetter ¶
type SumBigIntSetter ¶
type SumFloat64Setter ¶
type SumInt64Setter ¶
Click to show internal directories.
Click to hide internal directories.