import { ExecutionContextConfig, RunSliceResult, WorkerSliceState, WorkerStatus, JobAPIInstances } from './interfaces.js'; import { WorkerOperationLifeCycle, Slice } from '../interfaces/index.js'; import { FetcherCore, ProcessorCore, OperationCore } from '../operations/core/index.js'; import JobObserver from '../operations/job-observer.js'; import TapObserver from '../operations/tap-observer.js'; import BaseExecutionContext from './base.js'; /** * WorkerExecutionContext is designed to add more * functionality to interface with the * Execution Configuration and any Operation. */ export declare class WorkerExecutionContext extends BaseExecutionContext implements WorkerOperationLifeCycle { readonly processors: ProcessorCore[]; /** the active (or last) run slice */ sliceState: WorkerSliceState | undefined; status: WorkerStatus; private readonly _fetcher; private _queue; constructor(config: ExecutionContextConfig); static createContext(config: ExecutionContextConfig): Promise; initialize(): Promise; shutdown(): Promise; /** * Get a operation by name or index. * If name is used it will return the first match. */ getOperation(findBy: string | number): T; /** The instance of a "Fetcher" */ fetcher(): T; get apis(): JobAPIInstances; get jobObserver(): JobObserver; get tapObserver(): TapObserver; initializeSlice(slice: Slice): Promise; /** * Run a slice against the fetcher and then processors. * * @todo this should handle slice retries. */ runSlice(slice?: Slice): Promise; flush(deadline?: number): Promise; get processingSlice(): boolean; onFlushStart(): Promise; onFlushEnd(): Promise; onSliceInitialized(): Promise; onSliceStarted(): Promise; onSliceFinalizing(): Promise; onSliceFinished(): Promise; onSliceFailed(): Promise; onSliceRetry(): Promise; private _onOperationComplete; private _onOperationStart; private _updateSliceState; private _runSliceOnce; private _mergeAnalytics; private get _sliceId(); private get _slice(); } //# sourceMappingURL=worker.d.ts.map