@huddle01/observer-client-sdk
Advanced tools
Comparing version 0.11.0 to 0.11.1-0
{ | ||
"name": "@huddle01/observer-client-sdk", | ||
"version": "0.11.0", | ||
"version": "0.11.1-0", | ||
"description": "ObserverClient SDK", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -12,2 +12,3 @@ Observer Client SDK | ||
- [DataFrame](#dataframe) | ||
- [ObserverAdminClient](#observerclient) | ||
@@ -156,1 +157,42 @@ | ||
``` | ||
### ObserverAdminClient | ||
The `ObserverAdminClient` is an extension of the `ObserverClient` class designed to provide administrative control over the system. It offers additional methods to manage and monitor server and worker states, initiate and manage jobs, and clean up completed or failed tasks. | ||
#### Constructor | ||
```typescript | ||
constructor(config: ObserverClientConfig) | ||
``` | ||
- **config**: Configuration object for the ObserverAdminClient, inheriting from `ObserverClientConfig`. | ||
#### Methods | ||
* **getWorkerState(): Promise<GetWorkerStatesResponsePayload>** | ||
- Retrieves the current state of all workers in the system. | ||
- Returns a promise that resolves to the worker states payload. | ||
* **getServerState(): Promise<GetWorkerStatesResponsePayload>** | ||
- Retrieves the current state of all servers in the system. | ||
- Returns a promise that resolves to the server states payload. | ||
* **startJob<J extends keyof ConsumableJobMap>(type: J, parameters: ConsumableJobMap[J]['input']): Promise<{ jobId?: string }>** | ||
- Starts a new job of a specified type with the given parameters. | ||
- **type**: The type of job to be started, as defined in `ConsumableJobMap`. | ||
- **parameters**: The input parameters required for the specified job type. | ||
- Returns a promise that resolves to an object containing the `jobId` of the started job. | ||
* **cleanFailedJobs(...jobIds: string[]): Promise<void>** | ||
- Cleans up failed jobs from the system. If no job IDs are provided, it cleans up all failed jobs. | ||
- **jobIds** (optional): An array of job IDs to clean. If omitted, all failed jobs will be cleaned. | ||
- Returns a promise that resolves when the operation is complete. | ||
* **cleanCompletedJobs(...jobIds: string[]): Promise<void>** | ||
- Cleans up completed jobs from the system. If no job IDs are provided, it cleans up all completed jobs. | ||
- **jobIds** (optional): An array of job IDs to clean. If omitted, all completed jobs will be cleaned. | ||
- Returns a promise that resolves when the operation is complete. | ||
* **cancelJob<J extends keyof ConsumableJobMap>(type: J, jobId: string): Promise<boolean>** | ||
- Cancels a running job of a specified type and ID. | ||
- **type**: The type of job to be canceled. | ||
- **jobId**: The unique identifier of the job to be canceled. | ||
- Returns a promise that resolves to a boolean indicating whether the cancellation was successful. | ||
* **listJobs(): Promise<DashboardListConsumableJobsResponsePayload>** | ||
- Lists all jobs currently present in the system, including their status and details. | ||
- Returns a promise that resolves to the list of jobs. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
173144
196