mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-10 07:01:01 +00:00
added Join method to Static Nodeset so that Status is calculated with the local node
This commit is contained in:
parent
5857438d8b
commit
acc4b022d7
2 changed files with 6 additions and 0 deletions
|
|
@ -34,6 +34,11 @@ func (s *StaticNodeSet) Open() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (s *StaticNodeSet) Join(nodes []*Node) error {
|
||||
s.nodes = nodes
|
||||
return nil
|
||||
}
|
||||
|
||||
// Broadcaster is an interface for broadcasting messages.
|
||||
type Broadcaster interface {
|
||||
SendSync(pb proto.Message) error
|
||||
|
|
|
|||
|
|
@ -163,6 +163,7 @@ func (m *Command) SetupServer() error {
|
|||
m.Server.Broadcaster = pilosa.NopBroadcaster
|
||||
m.Server.Cluster.NodeSet = pilosa.NewStaticNodeSet()
|
||||
m.Server.BroadcastReceiver = pilosa.NopBroadcastReceiver
|
||||
m.Server.Cluster.NodeSet.(*pilosa.StaticNodeSet).Join(m.Server.Cluster.Nodes)
|
||||
default:
|
||||
return fmt.Errorf("'%v' is not a supported value for broadcaster type.", m.Config.Cluster.Type)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue