ControlAwareMailboxOptionsBuilder
Esta página aún no está disponible en tu idioma.
Defined in: src/mailbox/ControlAwareMailboxOptions.ts:109
Fluent builder for ControlAwareMailboxOptionsType:
const hubMailboxOptions = ControlAwareMailboxOptions.create<HubMessage>() .withIsControl((message) => message.kind === 'admin') .withCapacity(10_000) .withOverflow('drop-head');new ControlAwareMailbox(hubMailboxOptions);Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”T
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ControlAwareMailboxOptionsBuilder<
T>():ControlAwareMailboxOptionsBuilder<T>
Returns
Section titled “Returns”ControlAwareMailboxOptionsBuilder<T>
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”build()
Section titled “build()”build():
Partial<T>
Defined in: src/util/OptionsBuilder.ts:51
Snapshot the set fields as an independent Partial<T> (own props only).
Returns
Section titled “Returns”Partial<T>
Inherited from
Section titled “Inherited from”withCapacity()
Section titled “withCapacity()”withCapacity(
capacity):this
Defined in: src/mailbox/ControlAwareMailboxOptions.ts:121
Maximum queued ordinary messages. Must be >= 1. Unset means unbounded.
Parameters
Section titled “Parameters”capacity
Section titled “capacity”number
Returns
Section titled “Returns”this
withDeadLetterDrops()
Section titled “withDeadLetterDrops()”withDeadLetterDrops(
deadLetterDrops):this
Defined in: src/mailbox/ControlAwareMailboxOptions.ts:136
Dead-letter each dropped envelope instead of only counting it. Default false.
Parameters
Section titled “Parameters”deadLetterDrops
Section titled “deadLetterDrops”boolean
Returns
Section titled “Returns”this
withIsControl()
Section titled “withIsControl()”withIsControl(
isControl):this
Defined in: src/mailbox/ControlAwareMailboxOptions.ts:116
Which messages overtake the ordinary ones — only an answer of true counts. Required.
Parameters
Section titled “Parameters”isControl
Section titled “isControl”(message) => boolean
Returns
Section titled “Returns”this
withOnControlError()
Section titled “withOnControlError()”withOnControlError(
onControlError):this
Defined in: src/mailbox/ControlAwareMailboxOptions.ts:141
Hook fired each time isControl throws (for diagnostics). Unset, the first throw is logged once.
Parameters
Section titled “Parameters”onControlError
Section titled “onControlError”(cause, message) => void
Returns
Section titled “Returns”this
withOnDrop()
Section titled “withOnDrop()”withOnDrop(
onDrop):this
Defined in: src/mailbox/ControlAwareMailboxOptions.ts:131
Hook fired on each overflow drop, with the envelope it discarded.
Parameters
Section titled “Parameters”onDrop
Section titled “onDrop”Returns
Section titled “Returns”this
withOverflow()
Section titled “withOverflow()”withOverflow(
overflow):this
Defined in: src/mailbox/ControlAwareMailboxOptions.ts:126
What to do when an ordinary message arrives on a full mailbox. Default reject.
Parameters
Section titled “Parameters”overflow
Section titled “overflow”Returns
Section titled “Returns”this
create()
Section titled “create()”
staticcreate<T>():ControlAwareMailboxOptionsBuilder<T>
Defined in: src/mailbox/ControlAwareMailboxOptions.ts:111
Start a fresh builder. Equivalent to new ControlAwareMailboxOptionsBuilder<T>().
Type Parameters
Section titled “Type Parameters”T
Returns
Section titled “Returns”ControlAwareMailboxOptionsBuilder<T>
