Search
Preparing search index...
The search index is not available
@nestjs/microservices
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
ClientNats
Class ClientNats
Hierarchy
ClientProxy
ClientNats
Index
Constructors
constructor
Properties
connection
deserializer
logger
nats
Client
options
routing
Map
serializer
url
Methods
assign
Packet
Id
close
connect
connect$
create
Client
create
Observer
create
Subscription
Handler
dispatch
Event
emit
get
Options
Prop
handle
Error
initialize
Deserializer
initialize
Serializer
normalize
Pattern
publish
send
Constructors
constructor
new
Client
Nats
(
options
:
NatsOptions
[
"options"
]
)
:
ClientNats
Parameters
options:
NatsOptions
[
"options"
]
Returns
ClientNats
Properties
Protected
connection
connection
:
Promise
<
any
>
Protected
deserializer
deserializer
:
ProducerDeserializer
Protected
Readonly
logger
logger
:
Logger
= new Logger(ClientProxy.name)
Protected
nats
Client
nats
Client
:
Client
Protected
Readonly
options
options
:
NatsOptions
[
"options"
]
Protected
routing
Map
routing
Map
:
Map
<
string
,
Function
>
= new Map<string, Function>()
Protected
serializer
serializer
:
ProducerSerializer
Protected
Readonly
url
url
:
string
Methods
Protected
assign
Packet
Id
assign
Packet
Id
(
packet
:
ReadPacket
)
:
ReadPacket
&
PacketId
Parameters
packet:
ReadPacket
Returns
ReadPacket
&
PacketId
close
close
(
)
:
void
Returns
void
connect
connect
(
)
:
Promise
<
any
>
Returns
Promise
<
any
>
Protected
connect$
connect$
(
instance
:
any
, errorEvent
?:
string
, connectEvent
?:
string
)
:
Observable
<
any
>
Parameters
instance:
any
Default value
errorEvent:
string
= ERROR_EVENT
Default value
connectEvent:
string
= CONNECT_EVENT
Returns
Observable
<
any
>
create
Client
create
Client
(
)
:
Client
Returns
Client
Protected
create
Observer
create
Observer<T>
(
observer
:
Observer
<
T
>
)
:
(
packet
:
WritePacket
)
=>
void
Type parameters
T
Parameters
observer:
Observer
<
T
>
Returns
(
packet
:
WritePacket
)
=>
void
(
packet
:
WritePacket
)
:
void
Parameters
packet:
WritePacket
Returns
void
create
Subscription
Handler
create
Subscription
Handler
(
packet
:
ReadPacket
&
PacketId
, callback
:
(
packet
:
WritePacket
)
=>
any
)
:
Function
Parameters
packet:
ReadPacket
&
PacketId
callback:
(
packet
:
WritePacket
)
=>
any
(
packet
:
WritePacket
)
:
any
Parameters
packet:
WritePacket
Returns
any
Returns
Function
Protected
dispatch
Event
dispatch
Event
(
packet
:
ReadPacket
)
:
Promise
<
any
>
Parameters
packet:
ReadPacket
Returns
Promise
<
any
>
emit
emit<TResult, TInput>
(
pattern
:
any
, data
:
TInput
)
:
Observable
<
TResult
>
Type parameters
TResult =
any
TInput =
any
Parameters
pattern:
any
data:
TInput
Returns
Observable
<
TResult
>
Protected
get
Options
Prop
get
Options
Prop<T, K>
(
obj
:
T
, prop
:
K
, defaultValue
?:
T
[
K
]
)
:
T[K]
Type parameters
T
:
ClientOptions
[
"options"
]
K
:
keyof
T
Parameters
obj:
T
prop:
K
Default value
defaultValue:
T
[
K
]
= undefined
Returns
T[K]
handle
Error
handle
Error
(
client
:
Client
)
:
void
Parameters
client:
Client
Returns
void
Protected
initialize
Deserializer
initialize
Deserializer
(
options
:
ClientOptions
[
"options"
]
)
:
void
Parameters
options:
ClientOptions
[
"options"
]
Returns
void
Protected
initialize
Serializer
initialize
Serializer
(
options
:
ClientOptions
[
"options"
]
)
:
void
Parameters
options:
ClientOptions
[
"options"
]
Returns
void
Protected
normalize
Pattern
normalize
Pattern
(
pattern
:
MsPattern
)
:
string
Parameters
pattern:
MsPattern
Returns
string
Protected
publish
publish
(
partialPacket
:
ReadPacket
, callback
:
(
packet
:
WritePacket
)
=>
any
)
:
Function
Parameters
partialPacket:
ReadPacket
callback:
(
packet
:
WritePacket
)
=>
any
(
packet
:
WritePacket
)
:
any
Parameters
packet:
WritePacket
Returns
any
Returns
Function
send
send<TResult, TInput>
(
pattern
:
any
, data
:
TInput
)
:
Observable
<
TResult
>
Type parameters
TResult =
any
TInput =
any
Parameters
pattern:
any
data:
TInput
Returns
Observable
<
TResult
>
Globals
Client
Nats
constructor
connection
deserializer
logger
nats
Client
options
routing
Map
serializer
url
assign
Packet
Id
close
connect
connect$
create
Client
create
Observer
create
Subscription
Handler
dispatch
Event
emit
get
Options
Prop
handle
Error
initialize
Deserializer
initialize
Serializer
normalize
Pattern
publish
send
Generated using
TypeDoc