From 4c9b4ac26d6dcaaf1bb1ff79c135feae6fdb48bc Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期五, 26 十一月 2021 14:22:20 +0800 Subject: [PATCH] 增加接口 GetUserProfile --- client.go | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/client.go b/client.go index b4ef2df..ecda831 100644 --- a/client.go +++ b/client.go @@ -1,7 +1,8 @@ package bhomedbapi import ( - "basic.com/valib/bhomebus.git" + "basic.com/valib/c_bhomebus.git/proto/source/bhome_msg" + "errors" "fmt" "strconv" ) @@ -43,13 +44,23 @@ } } -var getNetNode = func(topic string) []bhomebus.NetNode{ +var getNetNode = func(topic string) []*bhome_msg.MsgQueryTopicReply_BHNodeAddress{ return nil } -func InitGetNetNode(fn func(name string)[]bhomebus.NetNode) { +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.MsgQueryTopicReply_BHNodeAddress) ([]byte, error) { + return nil, errors.New("please init InitDoReq first") +} + +func InitDoReq(fn func(*bhome_msg.MsgRequestTopic, []*bhome_msg.MsgQueryTopicReply_BHNodeAddress) ([]byte, error)) { if fn != nil { - getNetNode = fn + busReq = fn } } -- Gitblit v1.8.0