1 | import { IModulePatcher } from "./patchRequire";
|
2 | export { PatchFunction, IModulePatcher, makePatchingRequire } from "./patchRequire";
|
3 | export interface ISpanContext {
|
4 | traceId: string;
|
5 | spanId: string;
|
6 | traceFlags?: string;
|
7 | tracestate?: string;
|
8 | }
|
9 | declare type ScopeManager = any;
|
10 | export interface IStandardEvent<T> {
|
11 | timestamp: number;
|
12 | data: T;
|
13 | }
|
14 | export declare type ISubscriber<T> = (event: IStandardEvent<T>) => void;
|
15 | export declare type IFilter = (publishing: boolean) => boolean;
|
16 | export interface IChannel {
|
17 | shouldPublish(name: string): boolean;
|
18 | publish<T>(name: string, event: T): void;
|
19 | subscribe<T>(name: string, listener: ISubscriber<T>, filter?: IFilter): void;
|
20 | unsubscribe<T>(name: string, listener: ISubscriber<T>, filter?: IFilter): void;
|
21 | bindToContext<T extends Function>(cb: T): T;
|
22 | addContextPreservation<T extends Function>(preserver: (cb: T) => T): void;
|
23 | registerMonkeyPatch(packageName: string, patcher: IModulePatcher): void;
|
24 | spanContextPropagator: ScopeManager;
|
25 | }
|
26 | export declare const channel: IChannel;
|
27 |
|
\ | No newline at end of file |