Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultCMD ¶
DefaultCMD creates a basic Container that injects the infrastructure for
- Configuration (IAppConfig)
- Logging (IAppLogger
- Mediator (IMediator)
- EventStoreDB (for EventStore functionality) and
- NATS (for async integration)
MUST: This is the default drivers, for which the SDK provides built-in drivers. It serves as the basis for CMDApps and in order to make it a functioning application, you will need to provide Application-specific AggFtor and ConfigureEventAggBuilder injections as well as the relevant CmdFeatures.
OPTIONAL: You may extend this container by injecting additional Backend Drivers according to your requirements.
func DefaultPRJ ¶
DefaultPRJ creates a basic Container, discriminated by the type of the ReadModel that injects the infrastructure for
- Configuration (IAppConfig)
- Logging (IAppLogger)
- Mediator (IMediator)
- EventStoreDB (for EventStore functionality) and
- Redis (for caching)
You may extend this container with additional Backend Drivers according to your requirements.
func DefaultQRY ¶
DefaultQRY creates a basic Container that injects the infrastructure for - Configuration (IAppConfig)
- Logging (IAppLogger)
- Mediator (IMediator)
- EventStoreDB (for EventStore functionality)
- NATS (for async integration)
- Redis (for caching)
- ElasticSearch (for free text search)
You may extend this container with additional Backend Drivers according to your requirements.
Types ¶
type App ¶
App is the receiver that serves as the -base for all GO-SCREAM Apps
Definition: CPQRS: "Command GenProjection Query Segregation"
Extending on the principle of CQRS, we separate the responsibility of Projecting Events from the EventStream to a separate application
Definition: Screaming Architecture:
An architectural style in which all artifacts "scream" their purpose to the observer. This means that there cmd_must be a clear alignment between discovery and implementation artifacts.
Definition: GO-SCREAM Application:
a GO-SCREAM Applications is conceived as a Screaming Monolith (a form of Majestic Monolith), where "Features" are the building blocks of the application. Following the principles of Clean Architecture, all side effect functionality is addressed via interfaces.
There are 3 types of GO-SCREAM apps:
- *-CMD apps that implement pure COMMAND (write) functionality (the "C" in CPQRS)
- *-PRJ apps that implement pure PROJECTION (ETL) functionality. (the "P" in CPQRS)
- *-QRY apps that implement pure QUERY (read) functionality (the "Q" in CPQRS)
func NewApp ¶
func NewApp( config config.IAppConfig, run RunAppFunc, down DownAppFunc, ) *App
type DownAppFunc ¶
type RunAppFunc ¶
type RunAppFunc func() error