From 4ca592f56e70d4e6677eb8083722222df3f405d6 Mon Sep 17 00:00:00 2001 From: Kenfe-Mickael Laventure Date: Thu, 25 Feb 2016 16:39:54 -0800 Subject: [PATCH] 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 --- supervisor/supervisor.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/supervisor/supervisor.go b/supervisor/supervisor.go index 1d1ca98..e961eb2 100644 --- a/supervisor/supervisor.go +++ b/supervisor/supervisor.go @@ -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 }