From e67dc008802aafb884dc94da054f2090da4005e2 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期三, 02 六月 2021 15:44:57 +0800
Subject: [PATCH] upate bhsgo,use MsgQueryTopicReply_BHNodeAddress
---
client.go | 14 +++++++-------
sbusClient.go | 2 +-
clientFactory.go | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/client.go b/client.go
index e4f4704..7fc07bb 100644
--- a/client.go
+++ b/client.go
@@ -44,21 +44,21 @@
}
}
-var getNetNode = func(topic string) []bhome_msg.BHAddress{
+var getNetNode = func(topic string) []*bhome_msg.MsgQueryTopicReply_BHNodeAddress{
return nil
}
-func InitGetNetNode(fn func(name string)[]bhome_msg.BHAddress) {
- if fn != nil {
- getNetNode = fn
- }
+func InitGetNetNode(fn func(name string)[]*bhome_msg.MsgQueryTopicReply_BHNodeAddress) {
+ //if fn != nil {
+ // getNetNode = fn
+ //}
}
-var busReq = func(req *bhome_msg.MsgRequestTopic,dest []bhome_msg.BHAddress) ([]byte, error) {
+var busReq = func(req *bhome_msg.MsgRequestTopic,dest []*bhome_msg.MsgQueryTopicReply_BHNodeAddress) ([]byte, error) {
return nil, errors.New("please init InitDoReq first")
}
-func InitDoReq(fn func(*bhome_msg.MsgRequestTopic, []bhome_msg.BHAddress) ([]byte, error)) {
+func InitDoReq(fn func(*bhome_msg.MsgRequestTopic, []*bhome_msg.MsgQueryTopicReply_BHNodeAddress) ([]byte, error)) {
if fn != nil {
busReq = fn
}
diff --git a/clientFactory.go b/clientFactory.go
index d154fca..70fe0d1 100644
--- a/clientFactory.go
+++ b/clientFactory.go
@@ -16,7 +16,7 @@
}
type Option struct {
- nodes []bhome_msg.BHAddress
+ nodes []*bhome_msg.MsgQueryTopicReply_BHNodeAddress
}
type IOption interface {
@@ -37,7 +37,7 @@
}
}
-func WithNodes(nodeArr []bhome_msg.BHAddress) IOption {
+func WithNodes(nodeArr []*bhome_msg.MsgQueryTopicReply_BHNodeAddress) IOption {
return newFuncOption(func(o *Option) {
o.nodes = nodeArr
})
diff --git a/sbusClient.go b/sbusClient.go
index 421025c..40d464b 100644
--- a/sbusClient.go
+++ b/sbusClient.go
@@ -9,7 +9,7 @@
)
type SBusClient struct {
- nodes []bhome_msg.BHAddress
+ nodes []*bhome_msg.MsgQueryTopicReply_BHNodeAddress
}
type ProcInfo struct {
--
Gitblit v1.8.0