mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-18 22:17:44 +02:00
Add event id to router events
This commit is contained in:
@ -38,6 +38,10 @@ func (t *table) sendEvent(e *Event) {
|
||||
t.RLock()
|
||||
defer t.RUnlock()
|
||||
|
||||
if len(e.Id) == 0 {
|
||||
e.Id = uuid.New().String()
|
||||
}
|
||||
|
||||
for _, w := range t.watchers {
|
||||
select {
|
||||
case w.resChan <- e:
|
||||
|
Reference in New Issue
Block a user