Skip to content

Latest commit

 

History

History
77 lines (41 loc) · 1.11 KB

faastjs.faastmoduleproxy.on.md

File metadata and controls

77 lines (41 loc) · 1.11 KB
id title hide_title
faastjs.faastmoduleproxy.on
FaastModuleProxy.on() method
true

faastjs > FaastModuleProxy > on

FaastModuleProxy.on() method

Register a callback for statistics events.

Signature:

on(name: "stats", listener: (statsEvent: FunctionStatsEvent) => void): void;

Parameters

Parameter

Type

Description

name

"stats"

listener

(statsEvent: FunctionStatsEvent) => void

**Returns:**

void

Remarks

The callback is invoked once for each cloud function that was invoked within the last 1s interval, with a FunctionStatsEvent summarizing the statistics for each function. Typical usage:

faastModule.on("stats", console.log);