Commit eaa68766 authored by wangwx's avatar wangwx

fix hound error

parent 4469ec29
......@@ -31,25 +31,30 @@ import (
)
var (
// ErrNilZkClientConn no conn error
ErrNilZkClientConn = perrors.New("zookeeper Client{conn} is nil")
// ErrNilChildren no children error
ErrNilChildren = perrors.Errorf("has none children")
// ErrNilNode no node error
ErrNilNode = perrors.Errorf("node does not exist")
)
var (
zkClientPool ZookeeperClientPool
zkClientPool zookeeperClientPool
once sync.Once
)
type ZookeeperClientPool struct {
type zookeeperClientPool struct {
sync.Mutex
zkClient map[string]*ZookeeperClient
}
// ZkEventHandler interface
type ZkEventHandler interface {
HandleZkEvent(z *ZookeeperClient)
}
// DefaultHandler is default handler for zk event
type DefaultHandler struct {
}
......
......@@ -8,7 +8,7 @@ require (
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/davecgh/go-spew v1.1.1
github.com/dubbogo/go-zookeeper v1.0.2
github.com/dubbogo/go-zookeeper v1.0.3
github.com/dubbogo/jsonparser v1.0.1
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/go-ole/go-ole v1.2.4 // indirect
......@@ -43,7 +43,6 @@ require (
replace (
github.com/coreos/bbolt => go.etcd.io/bbolt v1.3.4
github.com/dubbogo/go-zookeeper => github.com/wenxuwan/go-zookeeper v1.0.3-0.20210303051024-8a4fef629f1a
go.etcd.io/bbolt v1.3.4 => github.com/coreos/bbolt v1.3.4
google.golang.org/grpc v1.33.1 => google.golang.org/grpc v1.26.0
)
......
......@@ -64,6 +64,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumC
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dubbogo/go-zookeeper v1.0.2 h1:xmEnPL8SlCe3/+J5ZR9e8qE35LmFVYe8VVpDakjNM4A=
github.com/dubbogo/go-zookeeper v1.0.2/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c=
github.com/dubbogo/go-zookeeper v1.0.3 h1:UkuY+rBsxdT7Bs63QAzp9z7XqQ53W1j8E5rwl83me8g=
github.com/dubbogo/go-zookeeper v1.0.3/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c=
github.com/dubbogo/jsonparser v1.0.1 h1:sAIr8gk+gkahkIm6CnUxh9wTCkbgwLEQ8dTXTnAXyzo=
github.com/dubbogo/jsonparser v1.0.1/go.mod h1:tYAtpctvSP/tWw4MeelsowSPgXQRVHHWbqL6ynps8jU=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment