UNPKG

liveperson-functions-cli

Version:
35 lines (34 loc) 1.06 kB
import { MetricsView } from '../view/metrics.view'; interface IInputFlags { start?: string | number; end?: string | number; last?: string; output?: string; } interface IMetricsConfig { lambdaFunction: string; inputFlags: IInputFlags; } export declare class MetricsController { private metricsView; constructor({ metricsView }?: { metricsView?: MetricsView; }); /** * Gets the logs of the passed function * @param {IMetricsConfig} - lambda function and flags * @returns {Promise<void>} * @memberof MetricsController */ getMetrics({ lambdaFunction, inputFlags, }: IMetricsConfig): Promise<void>; /** * Returns bucket size 5m, 1h, 1d in ms depending on the size of the time period (1h, 7d, >7d) * @param period contains start and end timestamp * @returns the bucket size in ms */ private static getAppropriateBucketSize; private static calculateStartTimestamp; private static getLambdaUUID; private static periodStringToTimestamp; } export {};