correlationSource
Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.
constcorrelationSource:object
Defined in: correlation.store.ts:30
The correlation id as a context source, for createPipeline({ sources })
of @cqrs-ddd/pipeline and the job context registration of
@cqrs-ddd/pipeline-job-context. Unlike getCorrelationId, current()
generates nothing: it returns undefined when no id is set, so a pipeline
generates one and runs with it, and getCorrelationId inside the
handler returns that id. create() makes a new id, the one way this
package, pipelines and jobs generate one. accepts(id) tells whether an id received from
outside, such as in a job payload, is well formed: at most
DEFAULT_CORRELATION_ID_MAX_LENGTH characters matching
DEFAULT_CORRELATION_ID_PATTERN.
Type Declaration
Section titled “Type Declaration”accepts
Section titled “accepts”
readonlyaccepts: (id) =>boolean
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
create
Section titled “create”
readonlycreate: () =>string
Returns
Section titled “Returns”string
current
Section titled “current”
readonlycurrent: () =>string|undefined
Returns
Section titled “Returns”string | undefined
readonlyrun: <T>(value,fn) =>T
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”string | undefined
() => T
Returns
Section titled “Returns”T
Example
Section titled “Example”createPipeline({ sources: { correlationId: correlationSource } });