UNPKG

2.03 kBTypeScriptView Raw
1import { Configuration } from "./configuration";
2import { HandleCommand } from "./HandleCommand";
3import { HandleEvent } from "./HandleEvent";
4import { HandlerResult } from "./HandlerResult";
5import { Ingester } from "./ingesters";
6import { ExpressServer } from "./internal/transport/express/ExpressServer";
7import { CommandIncoming, EventIncoming, RequestProcessor } from "./internal/transport/RequestProcessor";
8import { WebSocketClient } from "./internal/transport/websocket/WebSocketClient";
9import { AutomationServer } from "./server/AutomationServer";
10import { BuildableAutomationServer } from "./server/BuildableAutomationServer";
11import { Maker } from "./util/constructionUtils";
12export declare class AutomationClient implements RequestProcessor {
13 configuration: Configuration;
14 automations: BuildableAutomationServer;
15 webSocketClient: WebSocketClient;
16 httpServer: ExpressServer;
17 webSocketHandler: RequestProcessor;
18 httpHandler: RequestProcessor;
19 private defaultListeners;
20 constructor(configuration: Configuration);
21 readonly automationServer: AutomationServer;
22 withCommandHandler(chm: Maker<HandleCommand>): AutomationClient;
23 withEventHandler(event: Maker<HandleEvent<any>>): AutomationClient;
24 withIngester(ingester: Ingester | string): AutomationClient;
25 processCommand(command: CommandIncoming, callback?: (result: Promise<HandlerResult>) => void): any;
26 processEvent(event: EventIncoming, callback?: (results: Promise<HandlerResult[]>) => void): any;
27 run(): Promise<void>;
28 private configureStatsd;
29 private configureLogging;
30 private setupWebSocketClusterRequestHandler;
31 private setupWebSocketClusterWorkerRequestHandler;
32 private setupWebSocketRequestHandler;
33 private setupApplicationEvents;
34 private setupExpressRequestHandler;
35 private runWs;
36 private runHttp;
37 private printStartupMessage;
38}
39export declare function automationClient(configuration: Configuration): AutomationClient;
40//# sourceMappingURL=automationClient.d.ts.map
\No newline at end of file