Files
parcer/server/src/browser-management/classes/BrowserPool.ts

34 lines
831 B
TypeScript
Raw Normal View History

import { RemoteBrowser } from "./RemoteBrowser";
import logger from "../../logger";
2024-06-01 08:56:52 +05:30
/**
* @category Types
*/
interface BrowserPoolInfo {
2024-06-01 08:56:52 +05:30
/**
* The instance of remote browser.
*/
browser: RemoteBrowser,
2024-06-01 08:56:52 +05:30
/**
* States if the browser's instance is being actively used.
* Helps to persist the progress on the frontend when the application has been reloaded.
* @default false
*/
active: boolean,
2024-06-01 10:24:20 +05:30
/**
2025-03-07 22:40:07 +05:30
* The user ID that owns this browser instance.
2024-06-01 10:24:20 +05:30
*/
2025-03-07 22:40:07 +05:30
userId: string,
2024-06-01 10:24:20 +05:30
}
2025-03-07 22:40:07 +05:30
2025-03-07 22:40:34 +05:30
/**
* Dictionary of all the active remote browser's instances indexed by their id.
* The value in this dictionary is of type BrowserPoolInfo,
* which provides additional information about the browser's usage.
* @category Types
*/
interface PoolDictionary {
[key: string]: BrowserPoolInfo,
}