Documentation
¶
Index ¶
- type FullStoreFile
- type Job
- type ModuleStorageState
- type ModuleStorageStateMap
- type PartialStoreFile
- type PartialStoreFiles
- type Plan
- type Prioritizer
- type RemoteWorker
- type Result
- type RetryableErr
- type Snapshot
- type Snapshots
- type StorageState
- type Worker
- type WorkerFactory
- type WorkerFunc
- type WorkerPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FullStoreFile ¶
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 ModuleStorageState ¶
type ModuleStorageState struct {
ModuleName string
ModuleInitialBlock uint64
InitialCompleteRange *FullStoreFile // Points to a complete .kv file, to initialize the store upon getting started.
PartialsMissing PartialStoreFiles
PartialsPresent PartialStoreFiles
}
ModuleStorageState contains all the file-related ranges of things we'll want to plan work for, and things that are already available.
func TestModState ¶
func TestModState(modName string, rng string) *ModuleStorageState
func (*ModuleStorageState) MarshalLogObject ¶
func (w *ModuleStorageState) MarshalLogObject(enc zapcore.ObjectEncoder) error
type ModuleStorageStateMap ¶
type ModuleStorageStateMap map[string]*ModuleStorageState
func TestModStateMap ¶
func TestModStateMap(modStates ...*ModuleStorageState) (out ModuleStorageStateMap)
type PartialStoreFile ¶
type PartialStoreFiles ¶
type Plan ¶
type Plan struct {
ModulesStateMap ModuleStorageStateMap
// contains filtered or unexported fields
}
func BuildNewPlan ¶
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 Snapshots ¶
type Snapshots struct {
Completes block.Ranges // Shortest completes first, largest last.
Partials block.Ranges // First partials first, last last
}
func (*Snapshots) LastCompleteSnapshotBefore ¶
func (*Snapshots) LastCompletedBlock ¶
type StorageState ¶
func (*StorageState) String ¶
func (s *StorageState) String() 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.