Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

SubscriptionImpl

import { SubscriptionImpl } from "https://raw.githubusercontent.com/nats-io/nats.deno/v1.28.2/nats-base-client/internal_mod.ts";
class SubscriptionImpl extends QueuedIteratorImpl<Msg> implements Base, Subscription {
constructor(
protocol: ProtocolHandler,
subject: string,
);
cleanupFn?: (sub: Subscription, info?: unknown) => void;
closed: Deferred<void>;
drained?: Promise<void>;
draining: boolean;
info?: unknown;
max?: number;
protocol: ProtocolHandler;
queue?: string;
requestSubject?: string;
sid: number;
subject: string;
timer?: Timeout<void>;
 
callback(err: NatsError | null, msg: Msg);
cancelTimeout(): void;
close(): void;
drain(): Promise<void>;
getID(): number;
getMax(): number | undefined;
getSubject(): string;
isClosed(): boolean;
isDraining(): boolean;
setPrePostHandlers(opts: {
ingestionFilterFn?: IngestionFilterFn<Msg>;
protocolFilterFn?: ProtocolFilterFn<Msg>;
dispatchedFn?: DispatchedFn<Msg>;
}
);
unsubscribe(max?: number): void;
}

§Extends

§
QueuedIteratorImpl<Msg>
[src]

§Implements

§Constructors

§
new SubscriptionImpl(protocol: ProtocolHandler, subject: string, opts?: SubscriptionOptions)
[src]

§Properties

§
cleanupFn: (sub: Subscription, info?: unknown) => void
[src]
§
closed: Deferred<void>
[src]
§
drained: Promise<void>
[src]
§
draining: boolean
[src]
§
info: unknown
[src]
§
max: number
[src]
§
queue: string
[src]
§
requestSubject: string
[src]
§
sid: number
[src]
§
subject: string
[src]
§
timer: Timeout<void>
[src]

§Methods

§
callback(err: NatsError | null, msg: Msg)
[src]
§
cancelTimeout(): void
[src]
§
close(): void
[src]
§
drain(): Promise<void>
[src]
§
getID(): number
[src]
§
getMax(): number | undefined
[src]
§
getSubject(): string
[src]
§
isClosed(): boolean
[src]
§
isDraining(): boolean
[src]
§
setPrePostHandlers(opts: {
ingestionFilterFn?: IngestionFilterFn<Msg>;
protocolFilterFn?: ProtocolFilterFn<Msg>;
dispatchedFn?: DispatchedFn<Msg>;
}
)
[src]
§
unsubscribe(max?: number): void
[src]