ws-asyncapi API / core / ServerPlugin
Interface: ServerPlugin
Defined in: .api-entries/core/index.d.ts:67
Properties
name?
optionalname?:string
Defined in: .api-entries/core/index.d.ts:69
optional name (diagnostics)
Methods
onConnection()?
optionalonConnection(ctx):void|Promise<void>
Defined in: .api-entries/core/index.d.ts:71
a connection opened (after derives/onOpen ran)
Parameters
ctx
ServerPluginContext & object
Returns
void | Promise<void>
onDisconnect()?
optionalonDisconnect(ctx):void|Promise<void>
Defined in: .api-entries/core/index.d.ts:75
a connection closed
Parameters
ctx
Returns
void | Promise<void>
onMessage()?
optionalonMessage(ctx):void|Promise<void>
Defined in: .api-entries/core/index.d.ts:78
an inbound frame was received (kind is the numeric Frame; name is the event/command/rpc/stream name when the frame carries one)
Parameters
ctx
ServerPluginContext & object
Returns
void | Promise<void>
onError()?
optionalonError(ctx):void|Promise<void>
Defined in: .api-entries/core/index.d.ts:83
a command/middleware/handler error surfaced
Parameters
ctx
ServerPluginContext & object
Returns
void | Promise<void>