service

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: 36 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Service)

func WithCacheSaveInterval added in v0.2.0

func WithCacheSaveInterval(block uint64) Option

func WithMaxWasmFuelPerBlockModule added in v1.0.0

func WithMaxWasmFuelPerBlockModule(maxFuel uint64) Option

func WithPartialMode

func WithPartialMode() Option

func WithPipelineOptions

func WithPipelineOptions(f pipeline.PipelineOptioner) Option

func WithRequestStats added in v0.0.21

func WithRequestStats() Option

func WithWASMExtension

func WithWASMExtension(ext wasm.WASMExtensioner) Option

type Service

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

func New

func New(
	stateStore dstore.Store,
	blockType string,
	parallelSubRequests uint64,
	subrequestSplitSize uint64,
	substreamsClientConfig *client.SubstreamsClientConfig,
	opts ...Option,
) (s *Service, err error)

func TestNewService added in v0.1.0

func TestNewService(runtimeConfig config.RuntimeConfig, linearHandoffBlockNum uint64, streamFactoryFunc StreamFactoryFunc) *Service

func (*Service) BaseStateStore

func (s *Service) BaseStateStore() dstore.Store

func (*Service) BlockType

func (s *Service) BlockType() string

func (*Service) Blocks

func (s *Service) Blocks(request *pbsubstreams.Request, streamSrv pbsubstreams.Stream_BlocksServer) (grpcError error)

func (*Service) Register

func (s *Service) Register(
	server dgrpcserver.Server,
	mergedBlocksStore dstore.Store,
	forkedBlocksStore dstore.Store,
	forkableHub *hub.ForkableHub,
	logger *zap.Logger)

func (*Service) TestBlocks added in v0.1.0

func (s *Service) TestBlocks(ctx context.Context, isSubRequest bool, request *pbsubstreams.Request, respFunc substreams.ResponseFunc) error

type StreamFactory added in v0.0.21

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

func (*StreamFactory) GetHeadBlock added in v1.0.2

func (s *StreamFactory) GetHeadBlock() (uint64, error)

func (*StreamFactory) GetRecentFinalBlock added in v0.1.0

func (s *StreamFactory) GetRecentFinalBlock() (uint64, error)

func (*StreamFactory) New added in v0.0.21

func (sf *StreamFactory) New(
	ctx context.Context,
	h bstream.Handler,
	startBlockNum int64,
	stopBlockNum uint64,
	cursor string,
	cursorIsTarget bool,
) (Streamable, error)

type StreamFactoryFunc added in v0.1.0

type StreamFactoryFunc func(ctx context.Context, h bstream.Handler, startBlockNum int64, stopBlockNum uint64, cursor string, cursorIsTarget bool) (Streamable, error)

type Streamable added in v0.1.0

type Streamable interface {
	Run(ctx context.Context) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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