mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-21 00:17:47 +08:00
25 lines
629 B
TypeScript
25 lines
629 B
TypeScript
import type { ExecutionStopReason, ExecutorType } from '../domain/execution';
|
|
|
|
export type PersistedExecutionStopStatus =
|
|
| 'termination_requested'
|
|
| 'already_exited'
|
|
| 'identity_mismatch'
|
|
| 'pid_mismatch'
|
|
| 'unsupported'
|
|
| 'invalid';
|
|
|
|
export interface PersistedExecutionStopResult {
|
|
status: PersistedExecutionStopStatus;
|
|
termSignalSent: boolean;
|
|
killSignalSent: boolean;
|
|
}
|
|
|
|
export interface PersistedExecutionController {
|
|
readonly executorType: ExecutorType;
|
|
stop(input: {
|
|
durableHandle: string;
|
|
expectedPid?: number;
|
|
reason: ExecutionStopReason;
|
|
}): Promise<PersistedExecutionStopResult>;
|
|
}
|