保存一下

This commit is contained in:
2025-08-29 14:22:20 +08:00
parent edb725354e
commit 17024fbf89
15 changed files with 74 additions and 205 deletions

View File

@@ -0,0 +1,41 @@
import type { ProcessInfoImpl } from '@/core/process/impl/ProcessInfoImpl.ts'
import type { IProcess } from '@/core/process/IProcess.ts'
import type { IProcessInfo } from '@/core/process/IProcessInfo.ts'
/**
* 进程管理
*/
export interface IProcessManager {
/** 所有进程信息 */
get processInfos(): IProcessInfo[];
/**
* 注册进程
* @param process 进程
*/
registerProcess(process: IProcess): void;
/**
* 通过进程id查找进程
* @param id 进程id
*/
findProcessById(id: string): IProcess | undefined;
/**
* 通过进程名查找进程
* @param name 进程名
*/
findProcessByName<T extends IProcess = IProcess>(name: string): T | undefined;
/**
* 通过进程id删除进程
* @param id 进程id
*/
removeProcess(id: string): void;
/**
* 通过进程对象删除进程
* @param process 进程对象
*/
removeProcess(process: IProcess): void;
/**
* 通过进程名查找进程信息
* @param name 进程名
*/
findProcessInfoByName(name: string): IProcessInfo | undefined;
}