|
@ -8,7 +8,7 @@ import ( |
|
|
"google.golang.org/grpc/status" |
|
|
"google.golang.org/grpc/status" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
// BrokerConnectToBalancer receives connections from brokers and collects stats
|
|
|
|
|
|
|
|
|
// ConnectToBalancer receives connections from brokers and collects stats
|
|
|
func (broker *MessageQueueBroker) ConnectToBalancer(stream mq_pb.SeaweedMessaging_ConnectToBalancerServer) error { |
|
|
func (broker *MessageQueueBroker) ConnectToBalancer(stream mq_pb.SeaweedMessaging_ConnectToBalancerServer) error { |
|
|
if !broker.lockAsBalancer.IsLocked() { |
|
|
if !broker.lockAsBalancer.IsLocked() { |
|
|
return status.Errorf(codes.Unavailable, "not current broker balancer") |
|
|
return status.Errorf(codes.Unavailable, "not current broker balancer") |
|
|