substreams

package
v1.4.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(key string) ([]byte, bool)
	Set(key string, value []byte)
	Save(ctx context.Context)
	UpdateCache(ctx context.Context, blockNum uint64)
}

type CacheKey

type CacheKey string

type KV

type KV map[CacheKey][]byte

type NoOpCache

type NoOpCache struct {
}

func (NoOpCache) Get

func (NoOpCache) Get(key string) ([]byte, bool)

func (NoOpCache) Save

func (NoOpCache) Save(ctx context.Context)

func (NoOpCache) Set

func (NoOpCache) Set(key string, value []byte)

func (NoOpCache) UpdateCache

func (NoOpCache) UpdateCache(ctx context.Context, blockNum uint64)

type RPCCall

type RPCCall struct {
	ToAddr string
	Data   string // ex: "name() (string)"
}

func (*RPCCall) ToString

func (c *RPCCall) ToString() string

type RPCEngine

type RPCEngine struct {
	// contains filtered or unexported fields
}

func NewRPCEngine

func NewRPCEngine(rpcCachePath string, rpcEndpoints []string, cacheChunkSizeInBlock uint64) (*RPCEngine, error)

func (*RPCEngine) ETHCall added in v1.1.11

func (e *RPCEngine) ETHCall(ctx context.Context, traceID string, clock *pbsubstreams.Clock, in []byte) (out []byte, err error)

func (*RPCEngine) PipelineOptions

func (e *RPCEngine) PipelineOptions(ctx context.Context, startBlockNum, stopBlockNum uint64, traceID string) []pipeline.Option

func (*RPCEngine) WASMExtensions

func (e *RPCEngine) WASMExtensions() map[string]map[string]wasm.WASMExtension

type RPCResponse

type RPCResponse struct {
	Decoded       []interface{}
	Raw           string
	DecodingError error
	CallError     error // always deterministic
}

type StoreBackedCache

type StoreBackedCache struct {
	// contains filtered or unexported fields
}

func NewStoreBackedCache

func NewStoreBackedCache(ctx context.Context, store dstore.Store, blockNum, cacheSize uint64) *StoreBackedCache

func (*StoreBackedCache) Get

func (c *StoreBackedCache) Get(key string) ([]byte, bool)

func (*StoreBackedCache) Save

func (c *StoreBackedCache) Save(ctx context.Context)

func (*StoreBackedCache) Set

func (c *StoreBackedCache) Set(key string, value []byte)

func (*StoreBackedCache) UpdateCache

func (c *StoreBackedCache) UpdateCache(ctx context.Context, blockNum uint64)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL