import { SynthesizedHandler } from "../handler/synthesized-handler"; import type { KeyedEvent, OperatorHandler } from "../types"; import * as config_pb from '../proto/jobconfigpb/jobconfig_pb'; import type { Operator } from "./operator"; import { type JsonValue } from "@bufbuild/protobuf"; import { type ConfigVar } from "./config-var"; export interface JobContextParams { /** * The number of workers to use for the job. */ workerCount?: ConfigVar; /** * The number of key groups to use as the upper bound of possible partitions. * Prefer using the default value unless you have a specific reason to change * it. */ keyGroupCount?: number; workingStorageLocation: ConfigVar; savepointStorageLocation?: ConfigVar; } interface SourceSynthesis { keyEvent: (data: Uint8Array) => KeyedEvent[]; operators: Operator[]; config: config_pb.Source; } interface OperatorSynthesis { handler: OperatorHandler; } interface SinkSynthesis { config: config_pb.Sink; } type Lazy = () => T; /** * JobContext is an internal object passed within the job topology to register * sources, sinks, and operators. */ export declare class JobContext { private sources; private sinks; private operators; private jobParams; constructor(params: JobContextParams); synthesize(): { handler: SynthesizedHandler; config: JsonValue; }; registerSource(source: Lazy): void; registerSink(sink: Lazy): void; registerOperator(operator: Lazy): void; } export {};