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 Worker
- type WorkerFactory
- type WorkerFunc
- 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) *pbsubstreams.Request
func (*Job) MarshalLogObject ¶
func (j *Job) MarshalLogObject(enc zapcore.ObjectEncoder) error
type Plan ¶
type Plan struct { // ModulesStateMap ModulesStateMap storage.ModuleStorageStateMap // contains filtered or unexported fields }
func BuildNewPlan ¶
func BuildNewPlan(ctx context.Context, modulesStateMap storage.ModuleStorageStateMap, subrequestSplitSize, upToBlock 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.Factory, logger *zap.Logger) *RemoteWorker
func (*RemoteWorker) Work ¶
func (w *RemoteWorker) Work(ctx context.Context, request *pbsubstreams.Request, respFunc substreams.ResponseFunc) *Result
type RetryableErr ¶
type RetryableErr struct {
// contains filtered or unexported fields
}
func (*RetryableErr) Error ¶
func (r *RetryableErr) Error() string
type Worker ¶
type Worker interface {
Work(ctx context.Context, request *pbsubstreams.Request, respFunc substreams.ResponseFunc) *Result
}
type WorkerFactory ¶
The tracer will be provided by the worker pool, on worker creation
type WorkerFunc ¶
type WorkerFunc func(ctx context.Context, request *pbsubstreams.Request, respFunc substreams.ResponseFunc) *Result
func (WorkerFunc) Work ¶
func (f WorkerFunc) Work(ctx context.Context, request *pbsubstreams.Request, respFunc substreams.ResponseFunc) *Result
type WorkerPool ¶
func NewWorkerPool ¶
func NewWorkerPool(ctx context.Context, workerCount uint64, newWorkerFunc WorkerFactory) WorkerPool
Click to show internal directories.
Click to hide internal directories.