Skip to content

Commit d68adc0

Browse files
feat: create event publisher interface
1 parent c722847 commit d68adc0

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2023. Smart Operating Block
3+
*
4+
* Use of this source code is governed by an MIT-style
5+
* license that can be found in the LICENSE file or at
6+
* https://opensource.org/licenses/MIT.
7+
*/
8+
9+
package application.presenter
10+
11+
import entities.events.Event
12+
13+
/**
14+
* The publisher of events to the microservices.
15+
*/
16+
interface EventPublisher<in E : Event<Any>> {
17+
18+
/**
19+
* Publish the event.
20+
* It's independent on the output publishing platform.
21+
* @param event the event to publish.
22+
*/
23+
fun publishEvent(event: E)
24+
25+
}

0 commit comments

Comments
 (0)