Documentation ¶
Index ¶
- func TestMapState(modName string, rng string) storage.ModuleStorageState
- func TestModStateMap(modStates ...storage.ModuleStorageState) (out storage.ModuleStorageStateMap)
- func TestStoreState(modName string, rng string) storage.ModuleStorageState
- type Job
- type Plan
- type Prioritizer
- type RemoteWorker
- type Result
- type RetryableErr
- type SimpleWorkerFactory
- type Worker
- type WorkerFactory
- type WorkerPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestMapState ¶ added in v0.1.0
func TestMapState(modName string, rng string) storage.ModuleStorageState
func TestModStateMap ¶
func TestModStateMap(modStates ...storage.ModuleStorageState) (out storage.ModuleStorageStateMap)
func TestStoreState ¶ added in v0.1.0
func TestStoreState(modName string, rng string) storage.ModuleStorageState
Types ¶
type Job ¶
type Job struct { ModuleName string // target RequestRange *block.Range // contains filtered or unexported fields }
Job is a single unit of scheduling, meaning it is a request that goes to a remote gRPC service for execution.
func (*Job) CreateRequest ¶
func (j *Job) CreateRequest(originalModules *pbsubstreams.Modules) *pbssinternal.ProcessRangeRequest
func (*Job) MarshalLogObject ¶
func (j *Job) MarshalLogObject(enc zapcore.ObjectEncoder) error
type Plan ¶
type Plan struct { ModulesStateMap storage.ModuleStorageStateMap // contains filtered or unexported fields }
func BuildNewPlan ¶
func BuildNewPlan(ctx context.Context, modulesStateMap storage.ModuleStorageStateMap, subrequestSplitSize, upToBlock uint64, maxJobsAhead uint64, outputGraph *outputmodules.Graph) (*Plan, error)
func TestPlanReadyJobs ¶
func (*Plan) MarkDependencyComplete ¶
func (*Plan) SendInitialProgressMessages ¶
func (p *Plan) SendInitialProgressMessages(respFunc substreams.ResponseFunc) error
type Prioritizer ¶
type RemoteWorker ¶
type RemoteWorker struct {
// contains filtered or unexported fields
}
func NewRemoteWorker ¶
func NewRemoteWorker(clientFactory client.InternalClientFactory, logger *zap.Logger) *RemoteWorker
func (*RemoteWorker) ID ¶ added in v0.2.0
func (w *RemoteWorker) ID() string
func (*RemoteWorker) Work ¶
func (w *RemoteWorker) Work(ctx context.Context, request *pbssinternal.ProcessRangeRequest, respFunc substreams.ResponseFunc) *Result
type RetryableErr ¶
type RetryableErr struct {
// contains filtered or unexported fields
}
func NewRetryableErr ¶ added in v1.1.1
func NewRetryableErr(cause error) *RetryableErr
func (*RetryableErr) Error ¶
func (r *RetryableErr) Error() string
type SimpleWorkerFactory ¶ added in v0.2.0
type SimpleWorkerFactory struct {
// contains filtered or unexported fields
}
func NewWorkerFactoryFromFunc ¶ added in v0.2.0
func NewWorkerFactoryFromFunc(f func(ctx context.Context, request *pbssinternal.ProcessRangeRequest, respFunc substreams.ResponseFunc) *Result) *SimpleWorkerFactory
func (SimpleWorkerFactory) ID ¶ added in v0.2.0
func (f SimpleWorkerFactory) ID() string
func (SimpleWorkerFactory) Work ¶ added in v0.2.0
func (f SimpleWorkerFactory) Work(ctx context.Context, request *pbssinternal.ProcessRangeRequest, respFunc substreams.ResponseFunc) *Result
type Worker ¶
type Worker interface { ID() string Work(ctx context.Context, request *pbssinternal.ProcessRangeRequest, respFunc substreams.ResponseFunc) *Result }
type WorkerFactory ¶
The tracer will be provided by the worker pool, on worker creation
type WorkerPool ¶
func NewWorkerPool ¶
func NewWorkerPool(ctx context.Context, workerCount uint64, workerFactory WorkerFactory) WorkerPool
Click to show internal directories.
Click to hide internal directories.