Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ClientNats

Hierarchy

Index

Constructors

constructor

  • new ClientNats(options: NatsOptions["options"]): ClientNats

Properties

Protected connection

connection: Promise<any>

Protected deserializer

deserializer: ProducerDeserializer

Protected Readonly logger

logger: Logger = new Logger(ClientProxy.name)

Protected natsClient

natsClient: Client

Protected Readonly options

options: NatsOptions["options"]

Protected routingMap

routingMap: Map<string, Function> = new Map<string, Function>()

Protected serializer

serializer: ProducerSerializer

Protected Readonly url

url: string

Methods

Protected assignPacketId

close

  • close(): void

connect

  • connect(): Promise<any>

Protected connect$

  • connect$(instance: any, errorEvent?: string, connectEvent?: string): Observable<any>

createClient

Protected createObserver

  • createObserver<T>(observer: Observer<T>): (packet: WritePacket) => void

createSubscriptionHandler

Protected dispatchEvent

emit

  • emit<TResult, TInput>(pattern: any, data: TInput): Observable<TResult>

Protected getOptionsProp

  • getOptionsProp<T, K>(obj: T, prop: K, defaultValue?: T[K]): T[K]

handleError

  • handleError(client: Client): void

Protected initializeDeserializer

  • initializeDeserializer(options: ClientOptions["options"]): void

Protected initializeSerializer

  • initializeSerializer(options: ClientOptions["options"]): void

Protected normalizePattern

  • normalizePattern(pattern: MsPattern): string

Protected publish

send

  • send<TResult, TInput>(pattern: any, data: TInput): Observable<TResult>

Generated using TypeDoc