service

package
v1.0.2 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: 38 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(anyTierService)

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 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 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
}

type Tier1Service added in v1.0.2

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

func NewTier1 added in v1.0.2

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

func TestNewService added in v0.1.0

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

func (*Tier1Service) BaseStateStore added in v1.0.2

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

func (*Tier1Service) BlockType added in v1.0.2

func (s *Tier1Service) BlockType() string

func (*Tier1Service) Blocks added in v1.0.2

func (s *Tier1Service) Blocks(request *pbsubstreamsrpc.Request, streamSrv pbsubstreamsrpc.Stream_BlocksServer) (grpcError error)

func (*Tier1Service) Register added in v1.0.2

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

func (*Tier1Service) TestBlocks added in v1.0.2

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

type Tier2Service added in v1.0.2

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

func NewTier2 added in v1.0.2

func NewTier2(
	stateStore dstore.Store,
	blockType string,
	opts ...Option,
) (s *Tier2Service)

func TestNewServiceTier2 added in v1.0.2

func TestNewServiceTier2(runtimeConfig config.RuntimeConfig, streamFactoryFunc StreamFactoryFunc) *Tier2Service

func (*Tier2Service) BaseStateStore added in v1.0.2

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

func (*Tier2Service) BlockType added in v1.0.2

func (s *Tier2Service) BlockType() string

func (*Tier2Service) ProcessRange added in v1.0.2

func (s *Tier2Service) ProcessRange(request *pbssinternal.ProcessRangeRequest, streamSrv pbssinternal.Substreams_ProcessRangeServer) (grpcError error)

func (*Tier2Service) Register added in v1.0.2

func (s *Tier2Service) Register(
	server dgrpcserver.Server,
	mergedBlocksStore dstore.Store,
	_ dstore.Store,
	_ *hub.ForkableHub,
	logger *zap.Logger)

func (*Tier2Service) TestBlocks added in v1.0.2

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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