@solomonai/cache
Version:
<div align="center"> <h1 align="center">@solomonai/cache</h1> <h5>Cache all the things</h5> </div>
17 lines (15 loc) • 481 B
TypeScript
/**
* Implement this interface to send metrics to any sink of your choice
*/
interface Metrics<TMetric extends Record<string, unknown> = Record<string, unknown>> {
/**
* Emit a new metric event
*/
emit(metric: TMetric): void;
/**
* flush persists all metrics to durable storage
* You must call this method before your application exits, metrics are not persisted automatically.
*/
flush(): Promise<void>;
}
export type { Metrics as M };