import { DataEntity } from '@terascope/core-utils'; import { SliceTapResults } from '@terascope/types'; import Observer from './observer.js'; /** * An Observer for collecting a slice tap. * * The lifecycle methods run inside the slice pipeline and must never throw, * so a failed tap cannot fail the slice. Record the error on `pending.failure` * instead, and let `getTap` reject with it. */ export default class TapObserver extends Observer { private pending; onSliceInitialized(sliceId: string): void; onOperationComplete(sliceId: string, index: number, processed: number, records: DataEntity[]): void; onSliceFinalizing(sliceId: string): void; onSliceFailed(sliceId: string): void; /** * Send failure error if worker is shutting down. Shutdown should only * be called after the slice finishes, so this is just a precaution. */ shutdown(): Promise; /** * Collect a tap from the next slice this worker starts. */ getTap(size: number, timeoutMs: number): Promise; } //# sourceMappingURL=tap-observer.d.ts.map