liuxiaolong
2021-04-25 cc9d7e2dfad7c634e8ce69d02ce5fc4065e809e4
clientFactory.go
@@ -1,6 +1,8 @@
package bhomedbapi
import "basic.com/valib/bhomebus.git"
import (
   "basic.com/valib/bhshmq.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.BHAddress
}
type IOption interface {
@@ -35,7 +37,7 @@
   }
}
func WithNodes(nodeArr []bhomebus.NetNode) IOption {
func WithNodes(nodeArr []bhome_msg.BHAddress) IOption {
   return newFuncOption(func(o *Option) {
      o.nodes = nodeArr
   })