dt-common-device
Version:
A secure and robust device management library for IoT applications
39 lines (38 loc) • 1.53 kB
TypeScript
import { IWebhookQueueConfig } from "../types/webhook.types";
import { WebhookQueueService } from "./WebhookQueueService";
export declare class WebhookQueueFactory {
private static instances;
/**
* Create or get a webhook queue service instance
* @param config Configuration for the webhook queue
* @param instanceKey Optional key to identify different instances
* @returns WebhookQueueService instance
*/
static createWebhookQueue(config: IWebhookQueueConfig, instanceKey?: string): WebhookQueueService;
/**
* Get an existing webhook queue service instance
* @param instanceKey Key to identify the instance
* @returns WebhookQueueService instance or null if not found
*/
static getWebhookQueue(instanceKey?: string): WebhookQueueService | null;
/**
* Get all webhook queue service instances
* @returns Array of all WebhookQueueService instances
*/
static getAllWebhookQueues(): WebhookQueueService[];
/**
* Shutdown all webhook queue service instances
*/
static shutdownAll(): Promise<void>;
/**
* Check if a webhook queue service instance exists
* @param instanceKey Key to identify the instance
* @returns True if instance exists, false otherwise
*/
static hasWebhookQueue(instanceKey?: string): boolean;
/**
* Remove a webhook queue service instance
* @param instanceKey Key to identify the instance
*/
static removeWebhookQueue(instanceKey?: string): Promise<void>;
}