allocate brokers to serve segments

This commit is contained in:
chrislu
2022-07-11 00:20:27 -07:00
parent bb01b68fa0
commit 9f479aab98
12 changed files with 1311 additions and 254 deletions

View File

@@ -59,3 +59,11 @@ func (broker *MessageQueueBroker) withMasterClient(streamingMode bool, master pb
})
}
func (broker *MessageQueueBroker) withBrokerClient(streamingMode bool, server pb.ServerAddress, fn func(client mq_pb.SeaweedMessagingClient) error) error {
return pb.WithBrokerClient(streamingMode, server, broker.grpcDialOption, func(client mq_pb.SeaweedMessagingClient) error {
return fn(client)
})
}