|
@ -60,8 +60,8 @@ type MasterServer struct { |
|
|
preallocateSize int64 |
|
|
preallocateSize int64 |
|
|
|
|
|
|
|
|
Topo *topology.Topology |
|
|
Topo *topology.Topology |
|
|
vg *topology.VolumeGrowth |
|
|
|
|
|
vgCh chan *topology.VolumeGrowRequest |
|
|
|
|
|
|
|
|
vg *topology.VolumeGrowth |
|
|
|
|
|
volumeGrowthRequestChan chan *topology.VolumeGrowRequest |
|
|
|
|
|
|
|
|
boundedLeaderChan chan int |
|
|
boundedLeaderChan chan int |
|
|
|
|
|
|
|
@ -105,14 +105,14 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers map[string]pb.Se |
|
|
|
|
|
|
|
|
grpcDialOption := security.LoadClientTLS(v, "grpc.master") |
|
|
grpcDialOption := security.LoadClientTLS(v, "grpc.master") |
|
|
ms := &MasterServer{ |
|
|
ms := &MasterServer{ |
|
|
option: option, |
|
|
|
|
|
preallocateSize: preallocateSize, |
|
|
|
|
|
vgCh: make(chan *topology.VolumeGrowRequest, 1<<6), |
|
|
|
|
|
clientChans: make(map[string]chan *master_pb.KeepConnectedResponse), |
|
|
|
|
|
grpcDialOption: grpcDialOption, |
|
|
|
|
|
MasterClient: wdclient.NewMasterClient(grpcDialOption, "", cluster.MasterType, option.Master, "", "", *pb.NewServiceDiscoveryFromMap(peers)), |
|
|
|
|
|
adminLocks: NewAdminLocks(), |
|
|
|
|
|
Cluster: cluster.NewCluster(), |
|
|
|
|
|
|
|
|
option: option, |
|
|
|
|
|
preallocateSize: preallocateSize, |
|
|
|
|
|
volumeGrowthRequestChan: make(chan *topology.VolumeGrowRequest, 1<<6), |
|
|
|
|
|
clientChans: make(map[string]chan *master_pb.KeepConnectedResponse), |
|
|
|
|
|
grpcDialOption: grpcDialOption, |
|
|
|
|
|
MasterClient: wdclient.NewMasterClient(grpcDialOption, "", cluster.MasterType, option.Master, "", "", *pb.NewServiceDiscoveryFromMap(peers)), |
|
|
|
|
|
adminLocks: NewAdminLocks(), |
|
|
|
|
|
Cluster: cluster.NewCluster(), |
|
|
} |
|
|
} |
|
|
ms.boundedLeaderChan = make(chan int, 16) |
|
|
ms.boundedLeaderChan = make(chan int, 16) |
|
|
|
|
|
|
|
|