pipeline

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 32 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRequestDetails added in v0.1.0

func BuildRequestDetails(request *pbsubstreams.Request, isSubRequest bool, isOutputModule reqctx.IsOutputModuleFunc, getRecentFinalBlock getBlockFunc, getHeadBlock getBlockFunc) (req *reqctx.RequestDetails, err error)

func NewStoreBoundary added in v0.0.21

func NewStoreBoundary(
	interval uint64,
	requestStartBlockNum uint64,
	requestStopBlock uint64,
) *storeBoundary

Types

type ForkHandler added in v0.0.20

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

TODO(abourget): The scope of this object and the Engine

are not pretty similar, to keep track of certain pieces
of info that are reversible, and handle the back and forth
between undos and redos.
Perhaps what we could have here, is have those undo handlers
live on the Pipeline (where it makes sense)
and have some nested structs handle

func NewForkHandler added in v0.0.21

func NewForkHandler() *ForkHandler

type Option

type Option func(p *Pipeline)

func WithPostBlockHook

func WithPostBlockHook(f substreams.BlockHook) Option

func WithPostJobHook

func WithPostJobHook(f substreams.PostJobHook) Option

func WithPreBlockHook

func WithPreBlockHook(f substreams.BlockHook) Option

type Pipeline

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

func New

func New(
	ctx context.Context,
	outputGraph *outputmodules.Graph,
	stores *Stores,
	execoutStorage *execout.Configs,
	wasmRuntime *wasm.Runtime,
	execOutputCache *cache.Engine,
	runtimeConfig config.RuntimeConfig,
	respFunc func(resp *pbsubstreams.Response) error,
	opts ...Option,
) *Pipeline

func (*Pipeline) GetStoreMap added in v0.1.0

func (p *Pipeline) GetStoreMap() store.Map

func (*Pipeline) InitStoresAndBackprocess added in v0.2.0

func (p *Pipeline) InitStoresAndBackprocess(ctx context.Context) (err error)

func (*Pipeline) InitWASM added in v0.2.0

func (p *Pipeline) InitWASM(ctx context.Context) (err error)

func (*Pipeline) OnStreamTerminated added in v0.1.0

func (p *Pipeline) OnStreamTerminated(ctx context.Context, streamSrv Trailable, err error) error

OnStreamTerminated performs flush of store and setting trailers when the stream terminated gracefully from our point of view. If the stream terminated gracefully, we return `nil` otherwise, the original is returned.

func (*Pipeline) ProcessBlock added in v0.0.14

func (p *Pipeline) ProcessBlock(block *bstream.Block, obj interface{}) (err error)

type PipelineOptioner

type PipelineOptioner interface {
	PipelineOptions(ctx context.Context, request *pbsubstreams.Request) []Option
}

type Stores added in v0.1.0

type Stores struct {
	StoreMap store.Map
	// contains filtered or unexported fields
}

func NewStores added in v0.1.0

func NewStores(storeConfigs store.ConfigMap, storeSnapshotSaveInterval, requestStartBlockNum, stopBlockNum uint64, isSubRequest bool) *Stores

func (*Stores) SetStoreMap added in v0.1.0

func (s *Stores) SetStoreMap(storeMap store.Map)

type Trailable added in v0.0.21

type Trailable interface {
	SetTrailer(metadata.MD)
}

type UndoHandler added in v0.0.21

type UndoHandler func(clock *pbsubstreams.Clock, moduleOutputs []*pbsubstreams.ModuleOutput)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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