Add a new "live" Event type
This event type is used to notify consumers that everything following are real-time events. This allow clients that request events from the backlog to detect when those events have all been sent. Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
3856e27560
commit
4ca592f56e
1 changed files with 5 additions and 0 deletions
|
@ -168,6 +168,11 @@ func (s *Supervisor) Events(from time.Time) chan Event {
|
|||
}
|
||||
}
|
||||
}
|
||||
// Notify the client that from now on it's live events
|
||||
c <- Event{
|
||||
Type: "live",
|
||||
Timestamp: time.Now(),
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue