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

NatsConnectionImpl

import { NatsConnectionImpl } from "https://raw.githubusercontent.com/nats-io/nats.deno/v1.28.2/nats-base-client/internal_mod.ts";
class NatsConnectionImpl implements NatsConnection {
private constructor(opts: ConnectionOptions);
_services: ServicesAPI;
draining: boolean;
get info(): ServerInfo | undefined;
get features(): Features;
listeners: QueuedIterator<Status>[];
protocol: ProtocolHandler;
get services(): ServicesAPI;
 
_check(
subject: string,
sub: boolean,
pub: boolean,
);
_resub(
subject: string,
max?: number,
);
async close();
closed(): Promise<void | Error>;
async context(): Promise<Context>;
drain(): Promise<void>;
flush(): Promise<void>;
getServer(): string;
getServerVersion(): SemVer | undefined;
isClosed(): boolean;
isDraining(): boolean;
jetstream(opts?: JetStreamOptions | JetStreamManagerOptions): JetStreamClient;
async jetstreamManager(opts?: JetStreamManagerOptions): Promise<JetStreamManager>;
publish(
subject: string,
data?: Payload,
options?: PublishOptions,
): void;
publishMessage(msg: Msg);
reconnect(): Promise<void>;
request(
subject: string,
data?: Payload,
): Promise<Msg>;
requestMany(
subject: string,
data?: Payload,
opts?: Partial<RequestManyOptions>,
): Promise<QueuedIterator<Msg>>;
respondMessage(msg: Msg);
async rtt(): Promise<number>;
stats(): Stats;
status(): AsyncIterable<Status>;
subscribe(subject: string, opts?: SubscriptionOptions): Subscription;
 
static public connect(opts?: ConnectionOptions): Promise<NatsConnection>;
}

§Implements

§Constructors

§
new NatsConnectionImpl(opts: ConnectionOptions) private
[src]

§Properties

§
draining: boolean
[src]
§
info: ServerInfo | undefined readonly
[src]
§
features: Features readonly
[src]
§
services: ServicesAPI readonly
[src]

§Methods

§
_check(subject: string, sub: boolean, pub: boolean)
[src]
§
_resub(s: Subscription, subject: string, max?: number)
[src]
§
close()
[src]
§
closed(): Promise<void | Error>
[src]
§
context(): Promise<Context>
[src]
§
drain(): Promise<void>
[src]
§
flush(): Promise<void>
[src]

Flushes to the server. Promise resolves when round-trip completes.

@return
§
getServer(): string
[src]
§
getServerVersion(): SemVer | undefined
[src]
§
isClosed(): boolean
[src]
§
isDraining(): boolean
[src]
§
jetstream(opts?: JetStreamOptions | JetStreamManagerOptions): JetStreamClient
[src]
§
jetstreamManager(opts?: JetStreamManagerOptions): Promise<JetStreamManager>
[src]
§
publish(subject: string, data?: Payload, options?: PublishOptions): void
[src]
§
publishMessage(msg: Msg)
[src]
§
reconnect(): Promise<void>
[src]
§
request(subject: string, data?: Payload, opts?: RequestOptions): Promise<Msg>
[src]
§
requestMany(subject: string, data?: Payload, opts?: Partial<RequestManyOptions>): Promise<QueuedIterator<Msg>>
[src]
§
respondMessage(msg: Msg)
[src]
§
rtt(): Promise<number>
[src]
§
stats(): Stats
[src]
§
status(): AsyncIterable<Status>
[src]
§
subscribe(subject: string, opts?: SubscriptionOptions): Subscription
[src]

§Static Methods

§
connect(opts?: ConnectionOptions): Promise<NatsConnection>
[src]