nats
Version:
Node.js client for NATS, a lightweight, high-performance cloud native messaging system
19 lines (18 loc) • 598 B
TypeScript
import type { Request } from "./request";
import type { Msg } from "./types";
import { NatsError } from "./error";
export declare class MuxSubscription {
baseInbox: string;
reqs: Map<string, Request>;
constructor();
size(): number;
init(prefix?: string): string;
add(r: Request): void;
get(token: string): Request | undefined;
cancel(r: Request): void;
getToken(m: Msg): string | null;
all(): Request[];
handleError(isMuxPermissionError: boolean, err?: NatsError): boolean;
dispatcher(): (err: NatsError | null, m: Msg) => void;
close(): void;
}