shell: optionally read filer address from master

This commit is contained in:
Chris Lu
2021-11-02 23:38:45 -07:00
parent 18bfbf62fc
commit 5160eb08f7
10 changed files with 689 additions and 484 deletions

View File

@@ -67,6 +67,8 @@ type MasterServer struct {
MasterClient *wdclient.MasterClient
adminLocks *AdminLocks
Cluster *Cluster
}
func NewMasterServer(r *mux.Router, option *MasterOption, peers []pb.ServerAddress) *MasterServer {
@@ -103,6 +105,7 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers []pb.ServerAddre
grpcDialOption: grpcDialOption,
MasterClient: wdclient.NewMasterClient(grpcDialOption, "master", option.Master, "", peers),
adminLocks: NewAdminLocks(),
Cluster: NewCluster(),
}
ms.boundedLeaderChan = make(chan int, 16)