Header menu logo FCQRS

Fcqrs Module

Functions and values

Function or value Description

actor config loggerFactory connection clusterName

Full Usage: actor config loggerFactory connection clusterName

Parameters:
Returns: IActor

Create the actor system from plain values (cluster name as a string).

config : IConfiguration
loggerFactory : ILoggerFactory
connection : Connection option
clusterName : string
Returns: IActor

aggregate api def

Full Usage: aggregate api def

Parameters:
Returns: AggregateHandle<'Command, 'Event>

Register an aggregate and return its typed handle. Calling this IS the registration (it initializes the sharding region).

api : IActor
def : Aggregate<'State, 'Command, 'Event>
Returns: AggregateHandle<'Command, 'Event>

aggregateId s

Full Usage: aggregateId s

Parameters:
    s : string

Returns: AggregateId

An aggregate id from a string (e.g. a document/user key).

s : string
Returns: AggregateId

connect dbType connectionString

Full Usage: connect dbType connectionString

Parameters:
    dbType : DBType
    connectionString : string

Returns: Connection

Build a SQLite/etc. Connection from a raw connection string (ShortString hidden).

dbType : DBType
connectionString : string
Returns: Connection

journalTypes mappings

Full Usage: journalTypes mappings

Parameters:
    mappings : (Type * string) list

 Register stable journal names for payload types (see JournalTypes):
     Fcqrs.journalTypes [ journalType "doc.event"; ... ]
 Call before the actor system writes anything.
mappings : (Type * string) list

newCid ()

Full Usage: newCid ()

Parameters:
    () : unit

Returns: CID

A fresh correlation id (UUID v7).

() : unit
Returns: CID

projection api p

Full Usage: projection api p

Parameters:
Returns: ISubscribe

Register the read-model projection and return the subscription stream.

api : IActor
p : Projection
Returns: ISubscribe

saga api def

Full Usage: saga api def

Parameters:
    api : IActor
    def : Saga<'Data, 'State, 'OriginatorEvent>

Returns: SagaHandle

Register a saga and return its handle. The originator-event type is inferred from `def.StartOn`, so there are no type arguments to supply: `Fcqrs.saga api def`.

api : IActor
def : Saga<'Data, 'State, 'OriginatorEvent>
Returns: SagaHandle

wireSagaStarters api sagas

Full Usage: wireSagaStarters api sagas

Parameters:

Wire every registered saga into one saga-starter (or the empty starter if none). Call after the aggregates + sagas are registered.

api : IActor
sagas : SagaHandle list

Type something to start searching.