liuxiaolong
2021-12-09 40ef8d96ae3696aded2c14c3c80f93af39bd1169
clientFactory.go
@@ -1,6 +1,8 @@
package dbapi
package bhomedbapi
import "basic.com/valib/bhomebus.git"
import (
   "basic.com/valib/c_bhomebus.git/proto/source/bhome_msg"
)
//Factory new client
func NewClient(opts ...IOption) Client {
@@ -14,7 +16,7 @@
}
type Option struct {
   nodes []bhomebus.NetNode
   nodes []*bhome_msg.MsgQueryTopicReply_BHNodeAddress
}
type IOption interface {
@@ -35,7 +37,7 @@
   }
}
func WithNodes(nodeArr []bhomebus.NetNode) IOption {
func WithNodes(nodeArr []*bhome_msg.MsgQueryTopicReply_BHNodeAddress) IOption {
   return newFuncOption(func(o *Option) {
      o.nodes = nodeArr
   })