Documentation ¶
Index ¶
- Variables
- func GetCommonServerOptions(listenAddr string, logger *zap.Logger, healthcheck dgrpcserver.HealthCheck) []dgrpcserver.Option
- func ListenTier1(addr string, svc *Tier1Service, auth dauth.Authenticator, logger *zap.Logger, ...) error
- func ListenTier2(addr string, serviceDiscoveryURL *url.URL, svc *Tier2Service, ...) (err error)
- func RequestBackProcessing(ctx context.Context, logger *zap.Logger, blockRange *block.Range, ...)
- func ValidateTier1Request(request *pbsubstreamsrpc.Request, blockType string) error
- func ValidateTier2Request(request *pbssinternal.ProcessRangeRequest) error
- type BlockFilter
- type ExecutionPlan
- type LiveBackFiller
- type ModuleExecutionConfig
- type NoopHandler
- type Option
- type RequestBackProcessingFunc
- type StreamFactory
- type StreamFactoryFunc
- type Streamable
- type Tier1Service
- type Tier2Service
Constants ¶
This section is empty.
Variables ¶
View Source
var FailureBlacklistDuration = time.Minute * 10
View Source
var FailureBlacklistMinimalCount = 0
fail fast when the exact same request has already failed twice, preventing waste of tier2 resources
View Source
var FailureForcedBackoffIncrement = time.Millisecond * 500
hold the incoming request for this duration before answering with an error if the client keeps retrying
View Source
var FailureForcedBackoffLimit = time.Second * 30
View Source
var IsValidCacheTag = regexp.MustCompile(`^[a-zA-Z0-9_-]+$`).MatchString
View Source
var ValidateRequest = ValidateTier1Request
Deprecated: use ValidateTier1Request
Functions ¶
func GetCommonServerOptions ¶ added in v1.1.6
func GetCommonServerOptions(listenAddr string, logger *zap.Logger, healthcheck dgrpcserver.HealthCheck) []dgrpcserver.Option
func ListenTier1 ¶ added in v1.1.6
func ListenTier1( addr string, svc *Tier1Service, auth dauth.Authenticator, logger *zap.Logger, healthcheck dgrpcserver.HealthCheck, ) error
func ListenTier2 ¶ added in v1.1.6
func ListenTier2( addr string, serviceDiscoveryURL *url.URL, svc *Tier2Service, auth dauth.Authenticator, logger *zap.Logger, healthcheck dgrpcserver.HealthCheck, ) (err error)
func RequestBackProcessing ¶ added in v1.8.0
func ValidateTier1Request ¶ added in v1.6.0
func ValidateTier1Request(request *pbsubstreamsrpc.Request, blockType string) error
ValidateTier1Request is run by the server code.
func ValidateTier2Request ¶ added in v1.6.0
func ValidateTier2Request(request *pbssinternal.ProcessRangeRequest) error
Types ¶
type BlockFilter ¶ added in v1.6.0
type BlockFilter struct {
// contains filtered or unexported fields
}
type ExecutionPlan ¶ added in v1.6.0
type ExecutionPlan struct { ExistingExecOuts map[string]*execout.File ExecoutWriters map[string]*execout.Writer ExistingIndices map[string]map[string]*roaring64.Bitmap IndexWriters map[string]*index.Writer RequiredModules map[string]*pbsubstreams.Module StoresToWrite map[string]struct{} }
func GetExecutionPlan ¶ added in v1.6.0
type LiveBackFiller ¶ added in v1.8.0
type LiveBackFiller struct { RequestBackProcessing RequestBackProcessingFunc NextHandler bstream.Handler // contains filtered or unexported fields }
func NewLiveBackFiller ¶ added in v1.8.0
func NewLiveBackFiller(nextHandler bstream.Handler, logger *zap.Logger, stageToProcess int, segmentSize uint64, linearHandoff uint64, clientFactory client.InternalClientFactory, requestBackProcessing RequestBackProcessingFunc) *LiveBackFiller
func (*LiveBackFiller) ProcessBlock ¶ added in v1.8.0
func (l *LiveBackFiller) ProcessBlock(blk *pbbstream.Block, obj interface{}) (err error)
func (*LiveBackFiller) Start ¶ added in v1.8.0
func (l *LiveBackFiller) Start(ctx context.Context)
type ModuleExecutionConfig ¶ added in v1.6.0
type ModuleExecutionConfig struct {
// contains filtered or unexported fields
}
type NoopHandler ¶ added in v1.8.1
type NoopHandler struct {
// contains filtered or unexported fields
}
func NewNoopHandler ¶ added in v1.8.1
func NewNoopHandler(respFunc substreams.ResponseFunc) *NoopHandler
func (NoopHandler) ProcessBlock ¶ added in v1.8.1
func (n NoopHandler) ProcessBlock(blk *pbbstream.Block, obj interface{}) (err error)
type Option ¶
type Option func(anyTierService)
func WithMaxConcurrentRequests ¶ added in v1.4.0
func WithModuleExecutionTracing ¶ added in v1.1.4
func WithModuleExecutionTracing() Option
func WithReadinessFunc ¶ added in v1.4.0
func WithWASMExtensioner ¶ added in v1.5.0
func WithWASMExtensioner(ext wasm.WASMExtensioner) Option
type RequestBackProcessingFunc ¶ added in v1.8.0
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)
type StreamFactoryFunc ¶ added in v0.1.0
type Streamable ¶ added in v0.1.0
type Tier1Service ¶ added in v1.0.2
type Tier1Service struct { *shutter.Shutter ssconnect.UnimplementedStreamHandler // contains filtered or unexported fields }
func NewTier1 ¶ added in v1.0.2
func NewTier1( logger *zap.Logger, mergedBlocksStore dstore.Store, forkedBlocksStore dstore.Store, hub *hub.ForkableHub, stateStore dstore.Store, defaultCacheTag string, parallelSubRequests uint64, stateBundleSize uint64, blockType string, substreamsClientConfig *client.SubstreamsClientConfig, tier2RequestParameters reqctx.Tier2RequestParameters, opts ...Option, ) (*Tier1Service, error)
func TestNewService ¶ added in v0.1.0
func TestNewService(runtimeConfig config.RuntimeConfig, linearHandoffBlockNum uint64, streamFactoryFunc StreamFactoryFunc) *Tier1Service
func (*Tier1Service) Blocks ¶ added in v1.0.2
func (s *Tier1Service) Blocks( ctx context.Context, req *connect.Request[pbsubstreamsrpc.Request], stream *connect.ServerStream[pbsubstreamsrpc.Response], ) error
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( logger *zap.Logger, opts ...Option, ) (*Tier2Service, error)
func TestNewServiceTier2 ¶ added in v1.0.2
func TestNewServiceTier2(moduleExecutionTracing bool, streamFactoryFunc StreamFactoryFunc) *Tier2Service
func (*Tier2Service) ProcessRange ¶ added in v1.0.2
func (s *Tier2Service) ProcessRange(request *pbssinternal.ProcessRangeRequest, streamSrv pbssinternal.Substreams_ProcessRangeServer) error
func (*Tier2Service) TestProcessRange ¶ added in v1.1.9
func (s *Tier2Service) TestProcessRange(ctx context.Context, request *pbssinternal.ProcessRangeRequest, respFunc substreams.ResponseFunc) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.