Last active
January 4, 2020 21:36
-
-
Save StarpTech/ad9114575c6ac40a21e084cfceb3f222 to your computer and use it in GitHub Desktop.
Run command and publish events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (c *CommandBus) HandleCommand(cmd Command) { | |
events := c.CommandHandler.HandleCommand(cmd) | |
c.stan.Publish("eventstore.events", events) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment