From 29bd0319dc3f08bda3840bea01597eb22943ac8d Mon Sep 17 00:00:00 2001 From: Michael Baird Date: Tue, 28 Nov 2017 15:57:38 -0600 Subject: [PATCH] Create a SendSync Interface for the Broadcast handler --- broadcast.go | 1 + broadcast_test.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/broadcast.go b/broadcast.go index 0785a21cc..a5dc98cc7 100644 --- a/broadcast.go +++ b/broadcast.go @@ -86,6 +86,7 @@ func (c *nopBroadcaster) SendAsync(pb proto.Message) error { // handle broadcast messages. (Hint: this is implemented by pilosa.Server) type BroadcastHandler interface { ReceiveMessage(pb proto.Message) error + SendSync(pb proto.Message) error } // BroadcastReceiver is the interface for the object which will listen for and diff --git a/broadcast_test.go b/broadcast_test.go index 8f0245c88..1331520ba 100644 --- a/broadcast_test.go +++ b/broadcast_test.go @@ -103,3 +103,7 @@ func (h *SimpleBroadcastHandler) ReceiveMessage(pb proto.Message) error { h.receivedMessage = pb.(proto.Message) return nil } + +func (h *SimpleBroadcastHandler) SendSync(pb proto.Message) error { + return nil +}