-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adr: add a naming convention for events in the system
Signed-off-by: Login Victor <batazor@evrone.com>
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
docs/architecture/decisions/0002-implement-as-event-naming.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# 2. Implement as event naming | ||
|
||
Date: 2022-08-24 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
- Need set Event naming | ||
|
||
## Decision | ||
|
||
We will stick to the following format of naming system events: **shortlink.link.event.new** | ||
|
||
Where: | ||
- **shortlink** is the name of the all system | ||
- **link** is the domain name of the system | ||
- **event** event trait | ||
- **new** is the name of the event | ||
|
||
Example: | ||
|
||
```go | ||
// MQ events | ||
const ( | ||
// MQ_EVENT_LINK_NEW - subscribe on request created link | ||
MQ_EVENT_LINK_NEW = "shortlink.link.event.new" | ||
|
||
// MQ_EVENT_LINK_CREATED - subscribe on created link | ||
MQ_EVENT_LINK_CREATED = "shortlink.link.event.created" | ||
) | ||
``` | ||
|
||
## Consequences | ||
|
||
We get a single naming convention for events in the system. |