mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-24 11:09:12 +08:00
rename functions
This commit is contained in:
parent
d9bd343055
commit
d0d24f1e40
@ -21,12 +21,12 @@ func (p *TopicPublisher) doConnect(partition *mq_pb.Partition, brokerAddress str
|
||||
return publishClient, fmt.Errorf("dial broker %s: %v", brokerAddress, err)
|
||||
}
|
||||
brokerClient := mq_pb.NewSeaweedMessagingClient(grpcConnection)
|
||||
stream, err := brokerClient.SubscribeMessage(context.Background())
|
||||
stream, err := brokerClient.PublishMessage(context.Background())
|
||||
if err != nil {
|
||||
return publishClient, fmt.Errorf("create publish client: %v", err)
|
||||
}
|
||||
publishClient = &PublishClient{
|
||||
SeaweedMessaging_PublishClient: stream,
|
||||
SeaweedMessaging_PublishMessageClient: stream,
|
||||
Broker: brokerAddress,
|
||||
}
|
||||
if err = publishClient.Send(&mq_pb.PublishMessageRequest{
|
||||
|
@ -17,7 +17,7 @@ type PublisherConfiguration struct {
|
||||
}
|
||||
|
||||
type PublishClient struct {
|
||||
mq_pb.SeaweedMessaging_PublishClient
|
||||
mq_pb.SeaweedMessaging_PublishMessageClient
|
||||
Broker string
|
||||
Err error
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user