mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-21 01:00:24 +08:00
25 lines
578 B
TypeScript
25 lines
578 B
TypeScript
import type {
|
|
ExecutionContext,
|
|
ExecutionHandle,
|
|
ExecutionInspection,
|
|
ExecutionSpec,
|
|
ExecutionStopReason,
|
|
ExecutionStopResult,
|
|
ExecutorCapabilities,
|
|
ExecutorType,
|
|
} from '../domain/execution';
|
|
|
|
export interface Executor {
|
|
readonly type: ExecutorType;
|
|
capabilities(): ExecutorCapabilities;
|
|
start(
|
|
spec: ExecutionSpec,
|
|
context: ExecutionContext,
|
|
): Promise<ExecutionHandle>;
|
|
stop(
|
|
handle: ExecutionHandle,
|
|
reason: ExecutionStopReason,
|
|
): Promise<ExecutionStopResult>;
|
|
inspect(handle: ExecutionHandle): Promise<ExecutionInspection>;
|
|
}
|