unexport broadcaster

This commit is contained in:
Matt Jaffee 2018-07-02 08:34:58 -05:00
parent 7ec9c97e46
commit 9ea300da20
No known key found for this signature in database
GPG key ID: 08A3DFFF987B11BF
7 changed files with 13 additions and 19 deletions

View file

@ -23,8 +23,8 @@ import (
"github.com/pkg/errors"
)
// Broadcaster is an interface for broadcasting messages.
type Broadcaster interface {
// broadcaster is an interface for broadcasting messages.
type broadcaster interface {
SendSync(pb proto.Message) error
SendAsync(pb proto.Message) error
SendTo(to *Node, pb proto.Message) error
@ -35,24 +35,18 @@ func init() {
}
// NopBroadcaster represents a Broadcaster that doesn't do anything.
var NopBroadcaster Broadcaster
var NopBroadcaster broadcaster
type nopBroadcaster struct{}
// SendSync A no-op implementation of Broadcaster SendSync method.
func (n *nopBroadcaster) SendSync(pb proto.Message) error {
return nil
}
func (n nopBroadcaster) SendSync(pb proto.Message) error { return nil }
// SendAsync A no-op implementation of Broadcaster SendAsync method.
func (n *nopBroadcaster) SendAsync(pb proto.Message) error {
return nil
}
func (n nopBroadcaster) SendAsync(pb proto.Message) error { return nil }
// SendTo is a no-op implementation of Broadcaster SendTo method.
func (c *nopBroadcaster) SendTo(to *Node, pb proto.Message) error {
return nil
}
func (c nopBroadcaster) SendTo(to *Node, pb proto.Message) error { return nil }
// Broadcast message types.
const (

View file

@ -240,7 +240,7 @@ type cluster struct {
state string
Coordinator string
holder *Holder
broadcaster Broadcaster
broadcaster broadcaster
joiningLeavingNodes chan nodeAction
@ -1310,7 +1310,7 @@ type resizeJob struct {
ID int64
IDs map[string]bool
Instructions []*internal.ResizeInstruction
Broadcaster Broadcaster
Broadcaster broadcaster
action string
result chan string

View file

@ -64,7 +64,7 @@ type Field struct {
// Row attribute storage and cache
rowAttrStore AttrStore
broadcaster Broadcaster
broadcaster broadcaster
Stats StatsClient
// Field options.

View file

@ -50,7 +50,7 @@ type Holder struct {
// opened channel is closed once Open() completes.
opened chan struct{}
Broadcaster Broadcaster
Broadcaster broadcaster
NewAttrStore func(string) AttrStore

View file

@ -46,7 +46,7 @@ type Index struct {
// Column attribute storage and cache.
columnAttrStore AttrStore
broadcaster Broadcaster
broadcaster broadcaster
Stats StatsClient
Logger Logger

View file

@ -40,7 +40,7 @@ const (
)
// Ensure Server implements interfaces.
var _ Broadcaster = &Server{}
var _ broadcaster = &Server{}
var _ MemberServer = &Server{}
// Server represents a holder wrapped by a running HTTP server.

View file

@ -52,7 +52,7 @@ type View struct {
// prevent sending multiple `CreateShardMessage` messages
maxShard uint64
broadcaster Broadcaster
broadcaster broadcaster
stats StatsClient
RowAttrStore AttrStore
Logger Logger