@multicloud/sls-core
Version:
Core middleware and components for Serverless @multicloud.
23 lines (22 loc) • 572 B
TypeScript
/**
* Options for telemetry
*/
export interface TelemetryOptions {
/** Service for sending telemetry */
telemetryService: TelemetryService;
/** Service should flush if true */
shouldFlush: boolean;
}
/**
* Service for sending telemetry
*/
export interface TelemetryService {
/**
* Collect telemetry
* @param key Authentication for telemetry service
* @param data Message to log in telemetry
*/
collect: (key: string, data: object) => Promise<void>;
/** Flush all messages in service */
flush: () => Promise<void>;
}