Documentation
¶
Index ¶
- func ComputeStartBlock(startBlock uint64, saveBlockInterval uint64) uint64
- type CacheItem
- type ModulesOutputCache
- type OutputCache
- func (o *OutputCache) Get(block *bstream.Block) ([]byte, bool, error)
- func (o *OutputCache) IsOutOfRange(ref bstream.BlockRef) bool
- func (o *OutputCache) Load(ctx context.Context, atBlock uint64) (foud bool, err error)
- func (o *OutputCache) Set(block *bstream.Block, data []byte) error
- func (o *OutputCache) SortedCacheItems() (out []*CacheItem)
- func (o *OutputCache) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeStartBlock ¶
Types ¶
type ModulesOutputCache ¶
type ModulesOutputCache struct {
OutputCaches map[string]*OutputCache
SaveBlockInterval uint64
}
func NewModuleOutputCache ¶
func NewModuleOutputCache(saveBlockInterval uint64) *ModulesOutputCache
func (*ModulesOutputCache) RegisterModule ¶
func (c *ModulesOutputCache) RegisterModule(ctx context.Context, module *pbsubstreams.Module, hash string, baseCacheStore dstore.Store, requestedStartBlock uint64) (*OutputCache, error)
type OutputCache ¶
type OutputCache struct {
ModuleName string
CurrentBlockRange *block.Range
Store dstore.Store
// contains filtered or unexported fields
}
func NewOutputCache ¶
func NewOutputCache(moduleName string, store dstore.Store, saveBlockInterval uint64) *OutputCache
func (*OutputCache) IsOutOfRange ¶
func (o *OutputCache) IsOutOfRange(ref bstream.BlockRef) bool
func (*OutputCache) SortedCacheItems ¶
func (o *OutputCache) SortedCacheItems() (out []*CacheItem)
func (*OutputCache) String ¶
func (o *OutputCache) String() string
Click to show internal directories.
Click to hide internal directories.