serverless-spy
Version:
CDK-based library for writing elegant integration tests on AWS serverless architecture and an additional web console to monitor events in real time.
22 lines (21 loc) • 627 B
TypeScript
import iot from 'aws-iot-device-sdk';
export declare class SpyEventSender {
debugMode: boolean;
connection: iot.device | undefined;
scope: string;
iotEndpoint: string;
constructor(params: {
log?: (message: string, ...optionalParams: any[]) => void;
logError?: (message: string, ...optionalParams: any[]) => void;
scope: string;
iotEndpoint: string;
});
close(): Promise<void>;
connect(): Promise<void>;
publishSpyEvent(event: any): Promise<void>;
private encode;
private postData;
private getSpyEventType;
private log;
private logError;
}