mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
unexport broadcaster
This commit is contained in:
parent
7ec9c97e46
commit
9ea300da20
7 changed files with 13 additions and 19 deletions
18
broadcast.go
18
broadcast.go
|
|
@ -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 (
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
2
field.go
2
field.go
|
|
@ -64,7 +64,7 @@ type Field struct {
|
|||
// Row attribute storage and cache
|
||||
rowAttrStore AttrStore
|
||||
|
||||
broadcaster Broadcaster
|
||||
broadcaster broadcaster
|
||||
Stats StatsClient
|
||||
|
||||
// Field options.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
2
index.go
2
index.go
|
|
@ -46,7 +46,7 @@ type Index struct {
|
|||
// Column attribute storage and cache.
|
||||
columnAttrStore AttrStore
|
||||
|
||||
broadcaster Broadcaster
|
||||
broadcaster broadcaster
|
||||
Stats StatsClient
|
||||
|
||||
Logger Logger
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
2
view.go
2
view.go
|
|
@ -52,7 +52,7 @@ type View struct {
|
|||
// prevent sending multiple `CreateShardMessage` messages
|
||||
maxShard uint64
|
||||
|
||||
broadcaster Broadcaster
|
||||
broadcaster broadcaster
|
||||
stats StatsClient
|
||||
RowAttrStore AttrStore
|
||||
Logger Logger
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue