mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-11 15:21:02 +00:00
Simplify function arguments
This commit is contained in:
parent
e1f44d4e31
commit
d96a121347
2 changed files with 4 additions and 4 deletions
|
|
@ -97,9 +97,9 @@ type gossipConfig struct {
|
|||
}
|
||||
|
||||
// NewGossipNodeSet returns a new instance of GossipNodeSet.
|
||||
func NewGossipNodeSet(name string, gossipHost string, gossipPort int, gossipSeed string, sh pilosa.StatusHandler, logOutput io.Writer) *GossipNodeSet {
|
||||
func NewGossipNodeSet(name string, gossipHost string, gossipPort int, gossipSeed string, server *pilosa.Server) *GossipNodeSet {
|
||||
g := &GossipNodeSet{
|
||||
LogOutput: logOutput,
|
||||
LogOutput: server.LogOutput,
|
||||
}
|
||||
|
||||
//TODO: pull memberlist config from pilosa.cfg file
|
||||
|
|
@ -114,7 +114,7 @@ func NewGossipNodeSet(name string, gossipHost string, gossipPort int, gossipSeed
|
|||
g.config.memberlistConfig.AdvertisePort = gossipPort
|
||||
g.config.memberlistConfig.Delegate = g
|
||||
|
||||
g.statusHandler = sh
|
||||
g.statusHandler = server
|
||||
|
||||
return g
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ func (m *Command) SetupServer() error {
|
|||
if err != nil {
|
||||
gossipHost = m.Config.Host
|
||||
}
|
||||
gossipNodeSet := gossip.NewGossipNodeSet(m.Config.Host, gossipHost, gossipPort, gossipSeed, m.Server, m.Server.LogOutput)
|
||||
gossipNodeSet := gossip.NewGossipNodeSet(m.Config.Host, gossipHost, gossipPort, gossipSeed, m.Server)
|
||||
m.Server.Cluster.NodeSet = gossipNodeSet
|
||||
m.Server.Broadcaster = gossipNodeSet
|
||||
m.Server.BroadcastReceiver = gossipNodeSet
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue