Create a SendSync Interface for the Broadcast handler

This commit is contained in:
Michael Baird 2017-11-28 15:57:38 -06:00 committed by Travis Turner
parent 5af377e56a
commit 29bd0319dc
No known key found for this signature in database
GPG key ID: 7F08008DFD9314C9
2 changed files with 5 additions and 0 deletions

View file

@ -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

View file

@ -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
}