ReactionOptions.name
property · packages/sync/src/serverJournal.ts:139
readonly name: stringPart of every run's key, so renaming it is a new reaction. Letters, digits, _ and -, at most 64; unique in the document.
Sync / foldkit-sync/journal
interface · packages/sync/src/serverJournal.ts:137
interface ReactionOptions<AppModel, On, Appends, R> {
readonly name: string
readonly on: MessageSet<AppModel, any, On, any>
readonly appends?: MessageSet<AppModel, any, Appends, any>
readonly timeout?: Duration.Input
readonly attempts?: number
readonly parkAfter?: Duration.Input
readonly run: (
trigger: Trigger<On>,
) => Effect.Effect<ReadonlyArray<NoInfer<Appends>> | void, unknown, R>
}ReactionOptions.nameproperty · packages/sync/src/serverJournal.ts:139
readonly name: stringPart of every run's key, so renaming it is a new reaction. Letters, digits, _ and -, at most 64; unique in the document.
ReactionOptions.onproperty · packages/sync/src/serverJournal.ts:141
readonly on: MessageSet<AppModel, any, On, any>The committed Messages it runs after: a set of the contract's own application.
ReactionOptions.appendsproperty · packages/sync/src/serverJournal.ts:143
readonly appends?: MessageSet<AppModel, any, Appends, any>The server-only Messages it may append, checked on every answer. Without it, it appends nothing.
ReactionOptions.timeoutproperty · packages/sync/src/serverJournal.ts:145
readonly timeout?: Duration.InputHow long one run may take before it counts as failed. Default 10 seconds.
ReactionOptions.attemptsproperty · packages/sync/src/serverJournal.ts:147
readonly attempts?: numberA failing run is parked once it has failed this many times, and for at least parkAfter. Default 8.
ReactionOptions.parkAfterproperty · packages/sync/src/serverJournal.ts:149
readonly parkAfter?: Duration.InputHow long a run must have been failing before it may be parked, so an outage parks nothing. Default one hour.
ReactionOptions.runproperty · packages/sync/src/serverJournal.ts:154
readonly run: (
trigger: Trigger<On>,
) => Effect.Effect<ReadonlyArray<NoInfer<Appends>> | void, unknown, R>One external call, or none, and the Messages to append, at most 16. It may
run again with the same trigger: pass trigger.key to the provider.