保存一下
This commit is contained in:
41
src/core/process/IProcessManager.ts
Normal file
41
src/core/process/IProcessManager.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user