diff --git a/packages/glee/docs/reference/classes/adapters_cluster_redis.default.html b/packages/glee/docs/reference/classes/adapters_cluster_redis.default.html index 6cf838256..1bf0c40eb 100644 --- a/packages/glee/docs/reference/classes/adapters_cluster_redis.default.html +++ b/packages/glee/docs/reference/classes/adapters_cluster_redis.default.html @@ -1,4 +1,4 @@ -
Static
captureValue: boolean
+Static
captureValue: boolean
Change the default captureRejections
option on all new EventEmitter
objects.
Static
Readonly
captureValue: Symbol.for('nodejs.rejection')
Installing a listener using this symbol does not change the behavior once an 'error'
event is emitted. Therefore, the process will still crash if no
regular 'error'
listener is installed.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Rest
...args: any[]Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
+
Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
to each.
Returns true
if the event had listeners, false
otherwise.
import { EventEmitter } from 'node:events';
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
@@ -107,7 +107,7 @@
Alias for emitter.removeListener()
.
Alias for emitter.removeListener()
.
Rest
...args: any[]Adds the listener
function to the end of the listeners array for the event
named eventName
. No checks are made to see if the listener
has already
@@ -200,10 +200,10 @@
Rest
...args: any[]Sends a message to the remote server.
The message to send.
-Serialize a message into JSON.
The message to serialize.
The serialized message,
-By default EventEmitter
s will print a warning if more than 10
listeners are
+
By default EventEmitter
s will print a warning if more than 10
listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners()
method allows the limit to be
modified for this specific EventEmitter
instance. The value can be set to Infinity
(or 0
) to indicate an unlimited number of listeners.
Static
captureValue: boolean
+Static
captureValue: boolean
Change the default captureRejections
option on all new EventEmitter
objects.
Static
Readonly
captureValue: Symbol.for('nodejs.rejection')
Installing a listener using this symbol does not change the behavior once an 'error'
event is emitted. Therefore, the process will still crash if no
regular 'error'
listener is installed.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Rest
...args: any[]Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
to each.
Returns true
if the event had listeners, false
otherwise.
import { EventEmitter } from 'node:events';
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
@@ -100,11 +100,11 @@
Returns the current max listener value for the EventEmitter
which is either
set by emitter.setMaxListeners(n)
or defaults to defaultMaxListeners.
Returns the number of listeners listening for the event named eventName
.
+
Returns the number of listeners listening for the event named eventName
.
If listener
is provided, it will return how many times the listener is found
in the list of the listeners of the event.
The name of the event being listened for
@@ -115,7 +115,7 @@Alias for emitter.removeListener()
.
Alias for emitter.removeListener()
.
Rest
...args: any[]Adds the listener
function to the end of the listeners array for the event
named eventName
. No checks are made to see if the listener
has already
@@ -206,9 +206,9 @@
Returns a reference to the EventEmitter
, so that calls can be chained.
Rest
...args: any[]Sends a message to the remote server.
The message to send.
-By default EventEmitter
s will print a warning if more than 10
listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners()
method allows the limit to be
modified for this specific EventEmitter
instance. The value can be set to Infinity
(or 0
) to indicate an unlimited number of listeners.
Static
captureValue: boolean
+Static
captureValue: boolean
Change the default captureRejections
option on all new EventEmitter
objects.
Static
Readonly
captureValue: Symbol.for('nodejs.rejection')
Installing a listener using this symbol does not change the behavior once an 'error'
event is emitted. Therefore, the process will still crash if no
regular 'error'
listener is installed.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Rest
...args: any[]Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
to each.
Returns true
if the event had listeners, false
otherwise.
import { EventEmitter } from 'node:events';
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
@@ -112,11 +112,11 @@
Returns the current max listener value for the EventEmitter
which is either
set by emitter.setMaxListeners(n)
or defaults to defaultMaxListeners.
Returns the number of listeners listening for the event named eventName
.
+
Returns the number of listeners listening for the event named eventName
.
If listener
is provided, it will return how many times the listener is found
in the list of the listeners of the event.
The name of the event being listened for
@@ -127,7 +127,7 @@Alias for emitter.removeListener()
.
Alias for emitter.removeListener()
.
Rest
...args: any[]Adds the listener
function to the end of the listeners array for the event
named eventName
. No checks are made to see if the listener
has already
@@ -218,9 +218,9 @@
Returns a reference to the EventEmitter
, so that calls can be chained.
Rest
...args: any[]Sends a message to the remote server.
The message to send.
-By default EventEmitter
s will print a warning if more than 10
listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners()
method allows the limit to be
modified for this specific EventEmitter
instance. The value can be set to Infinity
(or 0
) to indicate an unlimited number of listeners.
Static
captureValue: boolean
+Static
captureValue: boolean
Change the default captureRejections
option on all new EventEmitter
objects.
Static
Readonly
captureValue: Symbol.for('nodejs.rejection')
Installing a listener using this symbol does not change the behavior once an 'error'
event is emitted. Therefore, the process will still crash if no
regular 'error'
listener is installed.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Rest
...args: any[]Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
+
Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
to each.
Returns true
if the event had listeners, false
otherwise.
import { EventEmitter } from 'node:events';
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
@@ -94,11 +94,11 @@
Returns the current max listener value for the EventEmitter
which is either
set by emitter.setMaxListeners(n)
or defaults to defaultMaxListeners.
Returns the number of listeners listening for the event named eventName
.
+
Returns the number of listeners listening for the event named eventName
.
If listener
is provided, it will return how many times the listener is found
in the list of the listeners of the event.
The name of the event being listened for
@@ -109,7 +109,7 @@Alias for emitter.removeListener()
.
Alias for emitter.removeListener()
.
Rest
...args: any[]Adds the listener
function to the end of the listeners array for the event
named eventName
. No checks are made to see if the listener
has already
@@ -200,9 +200,9 @@
Returns a reference to the EventEmitter
, so that calls can be chained.
Rest
...args: any[]Sends a message to the remote server.
The message to send.
-By default EventEmitter
s will print a warning if more than 10
listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners()
method allows the limit to be
modified for this specific EventEmitter
instance. The value can be set to Infinity
(or 0
) to indicate an unlimited number of listeners.
Static
captureValue: boolean
+Static
captureValue: boolean
Change the default captureRejections
option on all new EventEmitter
objects.
Static
Readonly
captureValue: Symbol.for('nodejs.rejection')
Installing a listener using this symbol does not change the behavior once an 'error'
event is emitted. Therefore, the process will still crash if no
regular 'error'
listener is installed.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Rest
...args: any[]Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
to each.
Returns true
if the event had listeners, false
otherwise.
import { EventEmitter } from 'node:events';
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
@@ -96,11 +96,11 @@
Returns the current max listener value for the EventEmitter
which is either
set by emitter.setMaxListeners(n)
or defaults to defaultMaxListeners.
Returns the number of listeners listening for the event named eventName
.
+
Returns the number of listeners listening for the event named eventName
.
If listener
is provided, it will return how many times the listener is found
in the list of the listeners of the event.
The name of the event being listened for
@@ -111,7 +111,7 @@Alias for emitter.removeListener()
.
Alias for emitter.removeListener()
.
Rest
...args: any[]Adds the listener
function to the end of the listeners array for the event
named eventName
. No checks are made to see if the listener
has already
@@ -202,9 +202,9 @@
Returns a reference to the EventEmitter
, so that calls can be chained.
Rest
...args: any[]Sends a message to the remote server.
The message to send.
-By default EventEmitter
s will print a warning if more than 10
listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners()
method allows the limit to be
modified for this specific EventEmitter
instance. The value can be set to Infinity
(or 0
) to indicate an unlimited number of listeners.
Static
captureValue: boolean
+Static
captureValue: boolean
Change the default captureRejections
option on all new EventEmitter
objects.
Static
Readonly
captureValue: Symbol.for('nodejs.rejection')
Installing a listener using this symbol does not change the behavior once an 'error'
event is emitted. Therefore, the process will still crash if no
regular 'error'
listener is installed.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Rest
...args: any[]Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
to each.
Returns true
if the event had listeners, false
otherwise.
import { EventEmitter } from 'node:events';
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
@@ -95,11 +95,11 @@
Returns the current max listener value for the EventEmitter
which is either
set by emitter.setMaxListeners(n)
or defaults to defaultMaxListeners.
Returns the number of listeners listening for the event named eventName
.
+
Returns the number of listeners listening for the event named eventName
.
If listener
is provided, it will return how many times the listener is found
in the list of the listeners of the event.
The name of the event being listened for
@@ -110,7 +110,7 @@Alias for emitter.removeListener()
.
Alias for emitter.removeListener()
.
Rest
...args: any[]Adds the listener
function to the end of the listeners array for the event
named eventName
. No checks are made to see if the listener
has already
@@ -201,9 +201,9 @@
Returns a reference to the EventEmitter
, so that calls can be chained.
Rest
...args: any[]Sends a message to the remote server.
The message to send.
-By default EventEmitter
s will print a warning if more than 10
listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners()
method allows the limit to be
modified for this specific EventEmitter
instance. The value can be set to Infinity
(or 0
) to indicate an unlimited number of listeners.
Static
captureValue: boolean
+Static
captureValue: boolean
Change the default captureRejections
option on all new EventEmitter
objects.
Static
Readonly
captureValue: Symbol.for('nodejs.rejection')
Installing a listener using this symbol does not change the behavior once an 'error'
event is emitted. Therefore, the process will still crash if no
regular 'error'
listener is installed.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Rest
...args: any[]Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
to each.
Returns true
if the event had listeners, false
otherwise.
import { EventEmitter } from 'node:events';
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
@@ -94,11 +94,11 @@
Returns the current max listener value for the EventEmitter
which is either
set by emitter.setMaxListeners(n)
or defaults to defaultMaxListeners.
Returns the number of listeners listening for the event named eventName
.
+
Returns the number of listeners listening for the event named eventName
.
If listener
is provided, it will return how many times the listener is found
in the list of the listeners of the event.
The name of the event being listened for
@@ -109,7 +109,7 @@Alias for emitter.removeListener()
.
Alias for emitter.removeListener()
.
Rest
...args: any[]Adds the listener
function to the end of the listeners array for the event
named eventName
. No checks are made to see if the listener
has already
@@ -200,9 +200,9 @@
Returns a reference to the EventEmitter
, so that calls can be chained.
Rest
...args: any[]Sends a message to the remote server.
The message to send.
-By default EventEmitter
s will print a warning if more than 10
listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners()
method allows the limit to be
modified for this specific EventEmitter
instance. The value can be set to Infinity
(or 0
) to indicate an unlimited number of listeners.
Static
captureValue: boolean
+Static
captureValue: boolean
Change the default captureRejections
option on all new EventEmitter
objects.
Static
Readonly
captureValue: Symbol.for('nodejs.rejection')
Installing a listener using this symbol does not change the behavior once an 'error'
event is emitted. Therefore, the process will still crash if no
regular 'error'
listener is installed.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Rest
...args: any[]Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
to each.
Returns true
if the event had listeners, false
otherwise.
import { EventEmitter } from 'node:events';
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
@@ -92,11 +92,11 @@
Returns the current max listener value for the EventEmitter
which is either
set by emitter.setMaxListeners(n)
or defaults to defaultMaxListeners.
Returns the number of listeners listening for the event named eventName
.
+
Returns the number of listeners listening for the event named eventName
.
If listener
is provided, it will return how many times the listener is found
in the list of the listeners of the event.
The name of the event being listened for
@@ -107,7 +107,7 @@Alias for emitter.removeListener()
.
Alias for emitter.removeListener()
.
Rest
...args: any[]Adds the listener
function to the end of the listeners array for the event
named eventName
. No checks are made to see if the listener
has already
@@ -198,9 +198,9 @@
Returns a reference to the EventEmitter
, so that calls can be chained.
Rest
...args: any[]Sends a message to the remote server.
The message to send.
-By default EventEmitter
s will print a warning if more than 10
listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners()
method allows the limit to be
modified for this specific EventEmitter
instance. The value can be set to Infinity
(or 0
) to indicate an unlimited number of listeners.
Static
stackStatic
captureValue: boolean
+Static
captureValue: boolean
Change the default captureRejections
option on all new EventEmitter
objects.
Static
Readonly
captureValue: Symbol.for('nodejs.rejection')
Installing a listener using this symbol does not change the behavior once an 'error'
event is emitted. Therefore, the process will still crash if no
regular 'error'
listener is installed.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Rest
...args: any[]Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
+
Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
to each.
Returns true
if the event had listeners, false
otherwise.
import { EventEmitter } from 'node:events';
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
@@ -91,11 +91,11 @@
Returns the current max listener value for the EventEmitter
which is either
set by emitter.setMaxListeners(n)
or defaults to defaultMaxListeners.
Returns the number of listeners listening for the event named eventName
.
+
Returns the number of listeners listening for the event named eventName
.
If listener
is provided, it will return how many times the listener is found
in the list of the listeners of the event.
The name of the event being listened for
@@ -197,9 +197,9 @@Returns a reference to the EventEmitter
, so that calls can be chained.
Rest
...args: any[]Sends a message to the remote server.
The message to send.
-By default EventEmitter
s will print a warning if more than 10
listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners()
method allows the limit to be
modified for this specific EventEmitter
instance. The value can be set to Infinity
(or 0
) to indicate an unlimited number of listeners.
Static
captureValue: boolean
+Static
captureValue: boolean
Change the default captureRejections
option on all new EventEmitter
objects.
Static
Readonly
captureValue: Symbol.for('nodejs.rejection')
Installing a listener using this symbol does not change the behavior once an 'error'
event is emitted. Therefore, the process will still crash if no
regular 'error'
listener is installed.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Rest
...args: any[]Deserializes the serialized message.
+Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
+
Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
to each.
Returns true
if the event had listeners, false
otherwise.
import { EventEmitter } from 'node:events';
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
@@ -197,10 +197,10 @@
Rest
...args: any[]Sends a message to the remote server.
The message to send.
-Serialize a message into JSON.
The message to serialize.
The serialized message,
-By default EventEmitter
s will print a warning if more than 10
listeners are
+
By default EventEmitter
s will print a warning if more than 10
listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners()
method allows the limit to be
modified for this specific EventEmitter
instance. The value can be set to Infinity
(or 0
) to indicate an unlimited number of listeners.
Checks whether a channel is associated with this connection.
+Instantiates Glee.
-Optional
options: GleeConfig = {}Static
captureValue: boolean
+Optional
options: GleeConfig = {}Static
captureValue: boolean
Change the default captureRejections
option on all new EventEmitter
objects.
Static
Readonly
captureValue: Symbol.for('nodejs.rejection')
Installing a listener using this symbol does not change the behavior once an 'error'
event is emitted. Therefore, the process will still crash if no
regular 'error'
listener is installed.
Optional
[captureRest
...args: AnyRestAdds a connection adapter.
-Alias for emitter.on(eventName, listener)
.
Optional
[captureRest
...args: AnyRestAdds a connection adapter.
+Alias for emitter.on(eventName, listener)
.
Rest
...args: any[]Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
+
Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
to each.
Returns true
if the event had listeners, false
otherwise.
import { EventEmitter } from 'node:events';
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
@@ -98,12 +98,12 @@
Returns the number of listeners listening for the event named eventName
.
+
Returns the number of listeners listening for the event named eventName
.
If listener
is provided, it will return how many times the listener is found
in the list of the listeners of the event.
The name of the event being listened for
@@ -207,17 +207,17 @@Rest
...args: any[]Send a message to the adapters.
The payload of the message you want to send.
-Sets the cluster adapter to use.
-Sets the cluster adapter to use.
+By default EventEmitter
s will print a warning if more than 10
listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners()
method allows the limit to be
modified for this specific EventEmitter
instance. The value can be set to Infinity
(or 0
) to indicate an unlimited number of listeners.
Returns a reference to the EventEmitter
, so that calls can be chained.
Synchronizes the other instances in the cluster with the message.
-Use a middleware for inbound messages.
-Rest
...middlewares: GenericMiddleware[]Rest
...middlewares: GenericMiddleware[]Use a middleware for outbound messages.
-Rest
...middlewares: GenericMiddleware[]Rest
...middlewares: GenericMiddleware[]Static
addExperimental
Listens once to the abort
event on the provided signal
.
Use a middleware for inbound messages.
+Rest
...middlewares: GenericMiddleware[]Rest
...middlewares: GenericMiddleware[]Use a middleware for outbound messages.
+Rest
...middlewares: GenericMiddleware[]Rest
...middlewares: GenericMiddleware[]Static
addExperimental
Listens once to the abort
event on the provided signal
.
Listening to the abort
event on abort signals is unsafe and may
lead to resource leaks since another third party with the signal can
call e.stopImmediatePropagation()
. Unfortunately Node.js cannot change
diff --git a/packages/glee/docs/reference/classes/lib_message.default.html b/packages/glee/docs/reference/classes/lib_message.default.html
index e092d873e..6ca0c203d 100644
--- a/packages/glee/docs/reference/classes/lib_message.default.html
+++ b/packages/glee/docs/reference/classes/lib_message.default.html
@@ -1,4 +1,4 @@
-
Static
captureValue: boolean
+Static
captureValue: boolean
Change the default captureRejections
option on all new EventEmitter
objects.
Static
Readonly
captureValue: Symbol.for('nodejs.rejection')
Installing a listener using this symbol does not change the behavior once an 'error'
event is emitted. Therefore, the process will still crash if no
regular 'error'
listener is installed.
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Rest
...args: any[]Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
to each.
Returns the current max listener value for the EventEmitter
which is either
set by emitter.setMaxListeners(n)
or defaults to defaultMaxListeners.
Returns the number of listeners listening for the event named eventName
.
+
Returns the number of listeners listening for the event named eventName
.
If listener
is provided, it will return how many times the listener is found
in the list of the listeners of the event.
The name of the event being listened for
@@ -113,8 +113,8 @@Alias for emitter.removeListener()
.
Alias for emitter.removeListener()
.
Rest
...args: any[]Adds the listener
function to the end of the listeners array for the event
named eventName
. No checks are made to see if the listener
has already
@@ -206,15 +206,15 @@
Returns a reference to the EventEmitter
, so that calls can be chained.
Rest
...args: any[]By default EventEmitter
s will print a warning if more than 10
listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners()
method allows the limit to be
modified for this specific EventEmitter
instance. The value can be set to Infinity
(or 0
) to indicate an unlimited number of listeners.
Returns a reference to the EventEmitter
, so that calls can be chained.
Static
addStatic
addExperimental
Listens once to the abort
event on the provided signal
.
Listening to the abort
event on abort signals is unsafe and may
lead to resource leaks since another third party with the signal can
call e.stopImmediatePropagation()
. Unfortunately Node.js cannot change
diff --git a/packages/glee/docs/reference/classes/lib_router.default.html b/packages/glee/docs/reference/classes/lib_router.default.html
index d65a147a6..c54673d91 100644
--- a/packages/glee/docs/reference/classes/lib_router.default.html
+++ b/packages/glee/docs/reference/classes/lib_router.default.html
@@ -1,4 +1,4 @@
-
Adds a normalized middleware to the inbound error middlewares collection.
+Adds a normalized middleware to the inbound error middlewares collection.
The middlewares to add to the collection.
Optional
channel: stringThe scope channel.
-Adds a normalized middleware to the inbound middlewares collection.
The middlewares to add to the collection.
Optional
channel: stringThe scope channel.
-Adds a normalized middleware to the outbound error middlewares collection.
The middlewares to add to the collection.
Optional
channel: stringThe scope channel.
-Adds a normalized middleware to the outbound middlewares collection.
The middlewares to add to the collection.
Optional
channel: stringThe scope channel.
-Returns all the inbound error middlewares.
-Returns all the inbound middlewares.
-Returns all the outbound error middlewares.
-Returns all the outbound middlewares.
-Returns all the inbound error middlewares.
+Returns all the inbound middlewares.
+Returns all the outbound error middlewares.
+Returns all the outbound middlewares.
+Use a middleware for inbound messages. Please, note that when passing a GleeRouter as a param, this function will make use of inbound and outbound middlewares.
-Rest
...middlewares: GenericMiddleware[]Rest
...middlewares: GenericMiddleware[]Use a middleware for outbound messages.
-Rest
...middlewares: GenericMiddleware[]Rest
...middlewares: GenericMiddleware[]Rest
...middlewares: GenericMiddleware[]Rest
...middlewares: GenericMiddleware[]Use a middleware for outbound messages.
+Rest
...middlewares: GenericMiddleware[]Rest
...middlewares: GenericMiddleware[]Static
captureValue: boolean
+Optional
authConfig: anyStatic
captureValue: boolean
Change the default captureRejections
option on all new EventEmitter
objects.
Static
Readonly
captureValue: Symbol.for('nodejs.rejection')
Optional
[captureRest
...args: AnyRestAlias for emitter.on(eventName, listener)
.
Rest
...args: any[]Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
+
Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
to each.
Returns true
if the event had listeners, false
otherwise.
import { EventEmitter } from 'node:events';
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
@@ -83,10 +83,10 @@
Returns the current max listener value for the EventEmitter
which is either
set by emitter.setMaxListeners(n)
or defaults to defaultMaxListeners.
Returns the number of listeners listening for the event named eventName
.
+
Returns the number of listeners listening for the event named eventName
.
If listener
is provided, it will return how many times the listener is found
in the list of the listeners of the event.
The name of the event being listened for
@@ -149,7 +149,7 @@The name of the event.
The callback function
Rest
...args: any[]Returns a copy of the array of listeners for the event named eventName
,
+
Returns a copy of the array of listeners for the event named eventName
,
including any wrappers (such as those created by .once()
).
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.once('log', () => console.log('log once'));
// Returns a new Array with a function `onceWrapper` which has a property
// `listener` which contains the original listener bound above
const listeners = emitter.rawListeners('log');
const logFnWrapper = listeners[0];
// Logs "log once" to the console and does not unbind the `once` event
logFnWrapper.listener();
// Logs "log once" to the console and removes the listener
logFnWrapper();
emitter.on('log', () => console.log('log persistently'));
// Will return a new Array with a single function bound by `.on()` above
const newListeners = emitter.rawListeners('log');
// Logs "log persistently" twice
newListeners[0]();
emitter.emit('log');
diff --git a/packages/glee/docs/reference/functions/docs.default.html b/packages/glee/docs/reference/functions/docs.default.html
index 42ef4d84c..9bfc4b11c 100644
--- a/packages/glee/docs/reference/functions/docs.default.html
+++ b/packages/glee/docs/reference/functions/docs.default.html
@@ -1 +1 @@
-Optional
message: defaultOptional
message: default
Instantiates a Glee Cluster adapter.