From e904a0672267d8f1b25fe92d0b08282f8b5b8d18 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期五, 26 十一月 2021 14:01:30 +0800 Subject: [PATCH] 增加接口 GetUserProfile --- client.go | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/client.go b/client.go index b343c0b..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,16 +44,26 @@ } } -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 } } func url2Topic(serviceName string, url string) string { - return serviceName+"_"+url + return url } \ No newline at end of file -- Gitblit v1.8.0