UNPKG

@atomist/automation-client

Version:

Atomist API for software low-level client

43 lines 2.58 kB
import { Configuration } from "./configuration"; import { HandleCommand } from "./HandleCommand"; import { HandleEvent } from "./HandleEvent"; import { HandlerResult } from "./HandlerResult"; import { ExpressServer } from "./internal/transport/express/ExpressServer"; import { CommandIncoming, EventIncoming, RequestProcessor } from "./internal/transport/RequestProcessor"; import { WebSocketClient } from "./internal/transport/websocket/WebSocketClient"; import { AutomationEventListener } from "./server/AutomationEventListener"; import { AutomationServer } from "./server/AutomationServer"; import { BuildableAutomationServer } from "./server/BuildableAutomationServer"; import { Maker } from "./util/constructionUtils"; export declare class AutomationClient implements RequestProcessor { configuration: Configuration; requestProcessorMaker?: (automations: AutomationServer, configuration: Configuration, listeners: AutomationEventListener[]) => RequestProcessor; automations: BuildableAutomationServer; webSocketClient: WebSocketClient; httpServer: ExpressServer; webSocketHandler: RequestProcessor; httpHandler: RequestProcessor; requestProcessor: RequestProcessor; private readonly defaultListeners; constructor(configuration: Configuration, requestProcessorMaker?: (automations: AutomationServer, configuration: Configuration, listeners: AutomationEventListener[]) => RequestProcessor); get automationServer(): AutomationServer; withCommandHandler(chm: Maker<HandleCommand>): AutomationClient; withEventHandler(event: Maker<HandleEvent<any>>): AutomationClient; withIngester(ingester: string): AutomationClient; processCommand(command: CommandIncoming, callback?: (result: Promise<HandlerResult>) => void): void; processEvent(event: EventIncoming, callback?: (results: Promise<HandlerResult[]>) => void): void; run(): Promise<void>; private configureRedactions; private raiseStartupEvent; private configureShutdown; private configureStatsd; private setupWebSocketClusterRequestHandler; private setupWebSocketClusterWorkerRequestHandler; private setupWebSocketRequestHandler; private setupApplicationEvents; private setupExpressRequestHandler; private runWs; private runHttp; } export declare function automationClient(configuration: Configuration, requestProcessorMaker?: (automations: AutomationServer, configuration: Configuration, listeners: AutomationEventListener[]) => RequestProcessor): AutomationClient; //# sourceMappingURL=automationClient.d.ts.map