From 33dc7d448cd31d98a8e9c91c5f68e704c08464d6 Mon Sep 17 00:00:00 2001 From: wangwx Date: Sat, 23 Jan 2021 11:40:41 +0800 Subject: [PATCH 01/35] try to fix zk too many connections --- config_center/zookeeper/impl.go | 8 +- registry/kubernetes/registry.go | 11 +-- registry/zookeeper/listener.go | 11 +-- registry/zookeeper/registry.go | 7 +- remoting/zookeeper/client.go | 128 +++++++++++----------------- remoting/zookeeper/client_test.go | 11 +-- remoting/zookeeper/facade.go | 54 ++---------- remoting/zookeeper/facade_test.go | 8 +- remoting/zookeeper/listener.go | 19 +---- remoting/zookeeper/listener_test.go | 11 +-- 10 files changed, 76 insertions(+), 192 deletions(-) diff --git a/config_center/zookeeper/impl.go b/config_center/zookeeper/impl.go index f3b2235025..8333088a21 100644 --- a/config_center/zookeeper/impl.go +++ b/config_center/zookeeper/impl.go @@ -20,20 +20,16 @@ package zookeeper import ( "strings" "sync" -) -import ( gxset "github.com/dubbogo/gost/container/set" - perrors "github.com/pkg/errors" -) -import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/logger" "github.com/apache/dubbo-go/config_center" "github.com/apache/dubbo-go/config_center/parser" "github.com/apache/dubbo-go/remoting/zookeeper" + perrors "github.com/pkg/errors" ) const ( @@ -209,8 +205,6 @@ func (c *zookeeperDynamicConfiguration) closeConfigs() { c.cltLock.Lock() defer c.cltLock.Unlock() logger.Infof("begin to close provider zk client") - // Close the old client first to close the tmp node - c.client.Close() c.client = nil } diff --git a/registry/kubernetes/registry.go b/registry/kubernetes/registry.go index c4a0352cfa..115f211217 100644 --- a/registry/kubernetes/registry.go +++ b/registry/kubernetes/registry.go @@ -22,21 +22,18 @@ import ( "path" "sync" "time" -) -import ( - "github.com/apache/dubbo-getty" + getty "github.com/apache/dubbo-getty" + perrors "github.com/pkg/errors" - v1 "k8s.io/api/core/v1" -) -import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/extension" "github.com/apache/dubbo-go/common/logger" "github.com/apache/dubbo-go/registry" "github.com/apache/dubbo-go/remoting/kubernetes" + v1 "k8s.io/api/core/v1" ) const ( @@ -202,7 +199,7 @@ func (r *kubernetesRegistry) HandleClientRestart() { failTimes int ) - defer r.WaitGroup() + defer r.WaitGroup().Done() LOOP: for { select { diff --git a/registry/zookeeper/listener.go b/registry/zookeeper/listener.go index 88109fcf52..53084c15dd 100644 --- a/registry/zookeeper/listener.go +++ b/registry/zookeeper/listener.go @@ -20,18 +20,14 @@ package zookeeper import ( "strings" "sync" -) - -import ( - perrors "github.com/pkg/errors" -) -import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/logger" "github.com/apache/dubbo-go/config_center" "github.com/apache/dubbo-go/registry" "github.com/apache/dubbo-go/remoting" + perrors "github.com/pkg/errors" + zk "github.com/apache/dubbo-go/remoting/zookeeper" ) @@ -142,9 +138,6 @@ func (l *RegistryConfigurationListener) Process(configType *config_center.Config func (l *RegistryConfigurationListener) Next() (*registry.ServiceEvent, error) { for { select { - case <-l.client.Done(): - logger.Warnf("listener's zk client connection (address {%s}) is broken, so zk event listener exit now.", l.client.ZkAddrs) - return nil, perrors.New("zookeeper client stopped") case <-l.close: return nil, perrors.New("listener have been closed") case <-l.registry.Done(): diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go index 3232ee624d..af80d8a275 100644 --- a/registry/zookeeper/registry.go +++ b/registry/zookeeper/registry.go @@ -23,20 +23,16 @@ import ( "path" "sync" "time" -) -import ( "github.com/dubbogo/go-zookeeper/zk" - perrors "github.com/pkg/errors" -) -import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/extension" "github.com/apache/dubbo-go/common/logger" "github.com/apache/dubbo-go/registry" "github.com/apache/dubbo-go/remoting/zookeeper" + perrors "github.com/pkg/errors" ) const ( @@ -178,7 +174,6 @@ func (r *zkRegistry) DoUnsubscribe(conf *common.URL) (registry.Listener, error) // CloseAndNilClient closes listeners and clear client func (r *zkRegistry) CloseAndNilClient() { - r.client.Close() r.client = nil } diff --git a/remoting/zookeeper/client.go b/remoting/zookeeper/client.go index 852a5564f9..4144ccf207 100644 --- a/remoting/zookeeper/client.go +++ b/remoting/zookeeper/client.go @@ -21,17 +21,14 @@ import ( "path" "strings" "sync" + "sync/atomic" "time" -) -import ( "github.com/dubbogo/go-zookeeper/zk" - perrors "github.com/pkg/errors" -) -import ( "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/logger" + perrors "github.com/pkg/errors" ) const ( @@ -46,17 +43,22 @@ var ( errNilChildren = perrors.Errorf("has none children") errNilNode = perrors.Errorf("node does not exist") ) +var ( + clientHaveCreated uint32 + mux sync.Mutex + zkClient *ZookeeperClient +) // ZookeeperClient represents zookeeper client Configuration type ZookeeperClient struct { - name string - ZkAddrs []string - sync.RWMutex // for conn - Conn *zk.Conn - Timeout time.Duration - exit chan struct{} - Wait sync.WaitGroup - + name string + ZkAddrs []string + sync.RWMutex // for conn + Conn *zk.Conn + Timeout time.Duration + Wait sync.WaitGroup + valid uint32 + reconnectCh chan struct{} eventRegistry map[string][]*chan struct{} eventRegistryLock sync.RWMutex } @@ -95,8 +97,7 @@ func StateToString(state zk.State) string { type Options struct { zkName string client *ZookeeperClient - - ts *zk.TestCluster + ts *zk.TestCluster } // Option will define a function of handling Options @@ -135,7 +136,7 @@ func ValidateZookeeperClient(container ZkClientFacade, opts ...Option) error { return perrors.WithMessagef(paramErr, "newZookeeperClient(address:%+v)", url.Location) } zkAddresses := strings.Split(url.Location, ",") - newClient, cltErr := NewZookeeperClient(options.zkName, zkAddresses, timeout) + newClient, cltErr := getZookeeperClient(options.zkName, zkAddresses, timeout) if cltErr != nil { logger.Warnf("newZookeeperClient(name{%s}, zk address{%v}, timeout{%d}) = error{%v}", options.zkName, url.Location, timeout.String(), cltErr) @@ -163,6 +164,23 @@ func ValidateZookeeperClient(container ZkClientFacade, opts ...Option) error { return perrors.WithMessagef(err, "newZookeeperClient(address:%+v)", url.PrimitiveURL) } +func getZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (*ZookeeperClient, error) { + if atomic.LoadUint32(&clientHaveCreated) == 0 { + mux.Lock() + defer mux.Unlock() + if atomic.LoadUint32(&clientHaveCreated) == 1 { + return zkClient, nil + } + _, err := NewZookeeperClient(name, zkAddrs, timeout) + if err == nil { + atomic.StoreUint32(&clientHaveCreated, 1) + } else { + return nil, err + } + } + return zkClient, nil +} + // nolint func NewZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (*ZookeeperClient, error) { var ( @@ -175,7 +193,7 @@ func NewZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (* name: name, ZkAddrs: zkAddrs, Timeout: timeout, - exit: make(chan struct{}), + reconnectCh: make(chan struct{}), eventRegistry: make(map[string][]*chan struct{}), } // connect to zookeeper @@ -184,9 +202,9 @@ func NewZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (* return nil, perrors.WithMessagef(err, "zk.Connect(zkAddrs:%+v)", zkAddrs) } - z.Wait.Add(1) + atomic.StoreUint32(&z.valid, 1) go z.HandleZkEvent(event) - + zkClient = z return z, nil } @@ -210,7 +228,7 @@ func NewMockZookeeperClient(name string, timeout time.Duration, opts ...Option) name: name, ZkAddrs: []string{}, Timeout: timeout, - exit: make(chan struct{}), + reconnectCh: make(chan struct{}), eventRegistry: make(map[string][]*chan struct{}), } @@ -245,29 +263,18 @@ func (z *ZookeeperClient) HandleZkEvent(session <-chan zk.Event) { ) defer func() { - z.Wait.Done() logger.Infof("zk{path:%v, name:%s} connection goroutine game over.", z.ZkAddrs, z.name) }() for { select { - case <-z.exit: - return case event = <-session: logger.Infof("client{%s} get a zookeeper event{type:%s, server:%s, path:%s, state:%d-%s, err:%v}", z.name, event.Type, event.Server, event.Path, event.State, StateToString(event.State), event.Err) switch (int)(event.State) { case (int)(zk.StateDisconnected): + atomic.StoreUint32(&z.valid, 0) logger.Warnf("zk{addr:%s} state is StateDisconnected, so close the zk client{name:%s}.", z.ZkAddrs, z.name) - z.stop() - z.Lock() - conn := z.Conn - z.Conn = nil - z.Unlock() - if conn != nil { - conn.Close() - } - return case (int)(zk.EventNodeDataChanged), (int)(zk.EventNodeChildrenChanged): logger.Infof("zkClient{%s} get zk node changed event{path:%s}", z.name, event.Path) z.eventRegistryLock.RLock() @@ -285,6 +292,11 @@ func (z *ZookeeperClient) HandleZkEvent(session <-chan zk.Event) { if state == (int)(zk.StateHasSession) { continue } + if event.State == zk.StateHasSession { + atomic.StoreUint32(&z.valid, 1) + close(z.reconnectCh) + z.reconnectCh = make(chan struct{}) + } z.eventRegistryLock.RLock() if a, ok := z.eventRegistry[event.Path]; ok && 0 < len(a) { for _, e := range a { @@ -339,53 +351,12 @@ func (z *ZookeeperClient) UnregisterEvent(zkPath string, event *chan struct{}) { } } -// nolint -func (z *ZookeeperClient) Done() <-chan struct{} { - return z.exit -} - -func (z *ZookeeperClient) stop() bool { - select { - case <-z.exit: - return true - default: - close(z.exit) - } - - return false -} - // ZkConnValid validates zookeeper connection func (z *ZookeeperClient) ZkConnValid() bool { - select { - case <-z.exit: - return false - default: - } - - z.RLock() - defer z.RUnlock() - return z.Conn != nil -} - -// nolint -func (z *ZookeeperClient) Close() { - if z == nil { - return - } - - z.stop() - z.Wait.Wait() - z.Lock() - conn := z.Conn - z.Conn = nil - z.Unlock() - if conn != nil { - logger.Infof("zkClient Conn{name:%s, zk addr:%d} exit now.", z.name, conn.SessionID()) - conn.Close() + if atomic.LoadUint32(&z.valid) == 1 { + return true } - - logger.Infof("zkClient{name:%s, zk addr:%s} exit now.", z.name, z.ZkAddrs) + return false } // Create will create the node recursively, which means that if the parent node is absent, @@ -641,3 +612,8 @@ func (z *ZookeeperClient) getConn() *zk.Conn { defer z.RUnlock() return z.Conn } + +// Reconnect gets zookeeper reconnect event chanel +func (z *ZookeeperClient) Reconnect() <-chan struct{} { + return z.reconnectCh +} diff --git a/remoting/zookeeper/client_test.go b/remoting/zookeeper/client_test.go index 3d0949973d..a5aa98c22f 100644 --- a/remoting/zookeeper/client_test.go +++ b/remoting/zookeeper/client_test.go @@ -20,17 +20,12 @@ package zookeeper import ( "testing" "time" -) -import ( + "github.com/apache/dubbo-go/common/logger" "github.com/dubbogo/go-zookeeper/zk" "github.com/stretchr/testify/assert" ) -import ( - "github.com/apache/dubbo-go/common/logger" -) - func verifyEventStateOrder(t *testing.T, c <-chan zk.Event, expectedStates []zk.State, source string) { for _, state := range expectedStates { for { @@ -79,7 +74,7 @@ func verifyEventStateOrder(t *testing.T, c <-chan zk.Event, expectedStates []zk. //} func Test_newMockZookeeperClient(t *testing.T) { - ts, z, event, err := NewMockZookeeperClient("test", 15*time.Second) + ts, _, event, err := NewMockZookeeperClient("test", 15*time.Second) assert.NoError(t, err) defer func() { err := ts.Stop() @@ -88,8 +83,6 @@ func Test_newMockZookeeperClient(t *testing.T) { states := []zk.State{zk.StateConnecting, zk.StateConnected, zk.StateHasSession} verifyEventStateOrder(t, event, states, "event channel") - z.Close() - verifyEventStateOrder(t, event, []zk.State{zk.StateDisconnected}, "event channel") } func TestCreate(t *testing.T) { diff --git a/remoting/zookeeper/facade.go b/remoting/zookeeper/facade.go index 4dc0a549f2..5f68faeb29 100644 --- a/remoting/zookeeper/facade.go +++ b/remoting/zookeeper/facade.go @@ -19,13 +19,8 @@ package zookeeper import ( "sync" -) -import ( - "github.com/apache/dubbo-getty" - perrors "github.com/pkg/errors" -) + "time" -import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/logger" ) @@ -42,50 +37,15 @@ type ZkClientFacade interface { // HandleClientRestart keeps the connection between client and server func HandleClientRestart(r ZkClientFacade) { - var ( - err error - - failTimes int - ) - -LOOP: for { select { + case <-r.ZkClient().Reconnect(): + r.RestartCallBack() + time.Sleep(10 * time.Microsecond) case <-r.Done(): - r.WaitGroup().Done() // dec the wg when registry is closed - logger.Warnf("(ZkProviderRegistry)reconnectZkRegistry goroutine exit now...") - break LOOP - // re-register all services - case <-r.ZkClient().Done(): - r.ZkClientLock().Lock() - r.ZkClient().Close() - zkName := r.ZkClient().name - zkAddress := r.ZkClient().ZkAddrs - r.SetZkClient(nil) - r.ZkClientLock().Unlock() - r.WaitGroup().Done() // dec the wg when zk client is closed - - // Connect zk until success. - failTimes = 0 - for { - select { - case <-r.Done(): - r.WaitGroup().Done() // dec the wg when registry is closed - logger.Warnf("(ZkProviderRegistry)reconnectZkRegistry goroutine exit now...") - break LOOP - case <-getty.GetTimeWheel().After(timeSecondDuration(failTimes * ConnDelay)): // Prevent crazy reconnection zk. - } - err = ValidateZookeeperClient(r, WithZkName(zkName)) - logger.Infof("ZkProviderRegistry.validateZookeeperClient(zkAddr{%s}) = error{%#v}", - zkAddress, perrors.WithStack(err)) - if err == nil && r.RestartCallBack() { - break - } - failTimes++ - if MaxFailTimes <= failTimes { - failTimes = MaxFailTimes - } - } + logger.Warnf("receive registry destroy, so HandleClientRestart quit") + r.WaitGroup().Done() + return } } } diff --git a/remoting/zookeeper/facade_test.go b/remoting/zookeeper/facade_test.go index 4a76a80ef1..5e9382ace6 100644 --- a/remoting/zookeeper/facade_test.go +++ b/remoting/zookeeper/facade_test.go @@ -21,14 +21,11 @@ import ( "sync" "testing" "time" -) -import ( + + "github.com/apache/dubbo-go/common" "github.com/dubbogo/go-zookeeper/zk" "github.com/stretchr/testify/assert" ) -import ( - "github.com/apache/dubbo-go/common" -) type mockFacade struct { client *ZookeeperClient @@ -98,7 +95,6 @@ func Test_Facade(t *testing.T) { go HandleClientRestart(mock) states := []zk.State{zk.StateConnecting, zk.StateConnected, zk.StateHasSession} verifyEventStateOrder(t, event, states, "event channel") - z.Close() verifyEventStateOrder(t, event, []zk.State{zk.StateDisconnected}, "event channel") //time.Sleep(2e9) } diff --git a/remoting/zookeeper/listener.go b/remoting/zookeeper/listener.go index 3eda6d9698..b34a16c3a2 100644 --- a/remoting/zookeeper/listener.go +++ b/remoting/zookeeper/listener.go @@ -22,19 +22,15 @@ import ( "strings" "sync" "time" -) -import ( - "github.com/apache/dubbo-getty" + getty "github.com/apache/dubbo-getty" "github.com/dubbogo/go-zookeeper/zk" - perrors "github.com/pkg/errors" -) -import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/logger" "github.com/apache/dubbo-go/remoting" + perrors "github.com/pkg/errors" ) var ( @@ -116,8 +112,6 @@ func (l *ZkEventListener) listenServiceNodeEvent(zkPath string, listener ...remo logger.Warnf("zk.ExistW(key{%s}) = event{EventNodeDeleted}", zkPath) return true } - case <-l.client.Done(): - return false } } } @@ -246,10 +240,6 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen case <-getty.GetTimeWheel().After(timeSecondDuration(failTimes * ConnDelay)): l.client.UnregisterEvent(zkPath, &event) continue - case <-l.client.Done(): - l.client.UnregisterEvent(zkPath, &event) - logger.Warnf("client.done(), listen(path{%s}) goroutine exit now...", zkPath) - return case <-event: logger.Infof("get zk.EventNodeDataChange notify event") l.client.UnregisterEvent(zkPath, &event) @@ -337,10 +327,6 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen } l.handleZkNodeEvent(zkEvent.Path, children, listener) break WATCH - case <-l.client.Done(): - logger.Warnf("client.done(), listen(path{%s}) goroutine exit now...", zkPath) - ticker.Stop() - return } } @@ -370,6 +356,5 @@ func (l *ZkEventListener) ListenServiceEvent(conf *common.URL, zkPath string, li // Close will let client listen exit func (l *ZkEventListener) Close() { - close(l.client.exit) l.wg.Wait() } diff --git a/remoting/zookeeper/listener_test.go b/remoting/zookeeper/listener_test.go index 896bdc6070..760fe8f176 100644 --- a/remoting/zookeeper/listener_test.go +++ b/remoting/zookeeper/listener_test.go @@ -22,14 +22,11 @@ import ( "sync" "testing" "time" -) -import ( - "github.com/dubbogo/go-zookeeper/zk" - "github.com/stretchr/testify/assert" -) -import ( + "github.com/apache/dubbo-go/common/logger" "github.com/apache/dubbo-go/remoting" + "github.com/dubbogo/go-zookeeper/zk" + "github.com/stretchr/testify/assert" ) var ( @@ -126,8 +123,6 @@ func (m *mockDataListener) DataChange(eventType remoting.Event) bool { m.eventList = append(m.eventList, eventType) if eventType.Content == m.changedData { m.wait.Done() - m.client.Close() - } return true } From 984a1ae647f703b86a7e80c2380776cfd4ee146b Mon Sep 17 00:00:00 2001 From: wangwx Date: Sat, 23 Jan 2021 11:44:38 +0800 Subject: [PATCH 02/35] remove close function in service_discovery --- registry/zookeeper/service_discovery.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/registry/zookeeper/service_discovery.go b/registry/zookeeper/service_discovery.go index 095a78dc3c..bff54101bd 100644 --- a/registry/zookeeper/service_discovery.go +++ b/registry/zookeeper/service_discovery.go @@ -23,15 +23,11 @@ import ( "strconv" "strings" "sync" -) -import ( - "github.com/dubbogo/gost/container/set" - "github.com/dubbogo/gost/hash/page" - perrors "github.com/pkg/errors" -) + gxset "github.com/dubbogo/gost/container/set" + + gxpage "github.com/dubbogo/gost/hash/page" -import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/extension" @@ -41,6 +37,7 @@ import ( "github.com/apache/dubbo-go/remoting" "github.com/apache/dubbo-go/remoting/zookeeper" "github.com/apache/dubbo-go/remoting/zookeeper/curator_discovery" + perrors "github.com/pkg/errors" ) const ( @@ -165,7 +162,6 @@ func (zksd *zookeeperServiceDiscovery) String() string { // Close client be closed func (zksd *zookeeperServiceDiscovery) Destroy() error { - zksd.client.Close() return nil } From 06b1cd18194c27d7c68e60bf8e9326f0d2ef2e6c Mon Sep 17 00:00:00 2001 From: wangwx Date: Sat, 23 Jan 2021 12:39:53 +0800 Subject: [PATCH 03/35] remove unused code --- remoting/zookeeper/client.go | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/remoting/zookeeper/client.go b/remoting/zookeeper/client.go index 4144ccf207..bb2d525113 100644 --- a/remoting/zookeeper/client.go +++ b/remoting/zookeeper/client.go @@ -112,14 +112,10 @@ func WithZkName(name string) Option { // ValidateZookeeperClient validates client and sets options func ValidateZookeeperClient(container ZkClientFacade, opts ...Option) error { - var ( - err error - ) options := &Options{} for _, opt := range opts { opt(options) } - connected := false lock := container.ZkClientLock() url := container.GetUrl() @@ -143,25 +139,8 @@ func ValidateZookeeperClient(container ZkClientFacade, opts ...Option) error { return perrors.WithMessagef(cltErr, "newZookeeperClient(address:%+v)", url.Location) } container.SetZkClient(newClient) - connected = true - } - - if container.ZkClient().Conn == nil { - var event <-chan zk.Event - container.ZkClient().Conn, event, err = zk.Connect(container.ZkClient().ZkAddrs, container.ZkClient().Timeout) - if err == nil { - container.ZkClient().Wait.Add(1) - connected = true - go container.ZkClient().HandleZkEvent(event) - } - } - - if connected { - logger.Infof("Connect to zookeeper successfully, name{%s}, zk address{%v}", options.zkName, url.Location) - container.WaitGroup().Add(1) // zk client start successful, then registry wg +1 } - - return perrors.WithMessagef(err, "newZookeeperClient(address:%+v)", url.PrimitiveURL) + return nil } func getZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (*ZookeeperClient, error) { From 16a43ac114c900065ac22de89558cbbf0b984600 Mon Sep 17 00:00:00 2001 From: wangwx Date: Sat, 23 Jan 2021 16:22:12 +0800 Subject: [PATCH 04/35] try to fix lint --- registry/zookeeper/registry.go | 2 +- registry/zookeeper/service_discovery.go | 1 + remoting/zookeeper/client.go | 32 +++++++++++++++++-------- remoting/zookeeper/facade.go | 9 ++++--- 4 files changed, 30 insertions(+), 14 deletions(-) diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go index af80d8a275..838164607c 100644 --- a/registry/zookeeper/registry.go +++ b/registry/zookeeper/registry.go @@ -73,7 +73,7 @@ func newZkRegistry(url *common.URL) (registry.Registry, error) { if err != nil { return nil, err } - + r.WaitGroup().Add(1) //zk client start successful, then wg +1 go zookeeper.HandleClientRestart(r) r.listener = zookeeper.NewZkEventListener(r.client) diff --git a/registry/zookeeper/service_discovery.go b/registry/zookeeper/service_discovery.go index bff54101bd..004fa9733c 100644 --- a/registry/zookeeper/service_discovery.go +++ b/registry/zookeeper/service_discovery.go @@ -108,6 +108,7 @@ func newZookeeperServiceDiscovery(name string) (registry.ServiceDiscovery, error if err != nil { return nil, err } + zksd.WaitGroup().Add(1) //zk client start successful, then wg +1 go zookeeper.HandleClientRestart(zksd) zksd.csd = curator_discovery.NewServiceDiscovery(zksd.client, rootPath) return zksd, nil diff --git a/remoting/zookeeper/client.go b/remoting/zookeeper/client.go index bb2d525113..ba67d85099 100644 --- a/remoting/zookeeper/client.go +++ b/remoting/zookeeper/client.go @@ -59,6 +59,7 @@ type ZookeeperClient struct { Wait sync.WaitGroup valid uint32 reconnectCh chan struct{} + closeCh chan struct{} eventRegistry map[string][]*chan struct{} eventRegistryLock sync.RWMutex } @@ -144,17 +145,17 @@ func ValidateZookeeperClient(container ZkClientFacade, opts ...Option) error { } func getZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (*ZookeeperClient, error) { + var err error if atomic.LoadUint32(&clientHaveCreated) == 0 { mux.Lock() defer mux.Unlock() - if atomic.LoadUint32(&clientHaveCreated) == 1 { - return zkClient, nil - } - _, err := NewZookeeperClient(name, zkAddrs, timeout) - if err == nil { - atomic.StoreUint32(&clientHaveCreated, 1) - } else { - return nil, err + if atomic.LoadUint32(&clientHaveCreated) == 0 { + zkClient, err = NewZookeeperClient(name, zkAddrs, timeout) + if err == nil { + atomic.StoreUint32(&clientHaveCreated, 1) + } else { + return nil, err + } } } return zkClient, nil @@ -173,6 +174,7 @@ func NewZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (* ZkAddrs: zkAddrs, Timeout: timeout, reconnectCh: make(chan struct{}), + closeCh: make(chan struct{}), eventRegistry: make(map[string][]*chan struct{}), } // connect to zookeeper @@ -183,7 +185,6 @@ func NewZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (* atomic.StoreUint32(&z.valid, 1) go z.HandleZkEvent(event) - zkClient = z return z, nil } @@ -208,6 +209,7 @@ func NewMockZookeeperClient(name string, timeout time.Duration, opts ...Option) ZkAddrs: []string{}, Timeout: timeout, reconnectCh: make(chan struct{}), + closeCh: make(chan struct{}), eventRegistry: make(map[string][]*chan struct{}), } @@ -592,7 +594,17 @@ func (z *ZookeeperClient) getConn() *zk.Conn { return z.Conn } -// Reconnect gets zookeeper reconnect event chanel +// Reconnect gets zookeeper reconnect event func (z *ZookeeperClient) Reconnect() <-chan struct{} { return z.reconnectCh } + +// CloseConn gets zookeeper client close event +func (z *ZookeeperClient) CloseConn() <-chan struct{} { + return z.closeCh +} + +// In my opinion, this method should never called by user, here just for lint +func (z *ZookeeperClient) Close() { + z.Conn.Close() +} diff --git a/remoting/zookeeper/facade.go b/remoting/zookeeper/facade.go index 5f68faeb29..92c3ea7230 100644 --- a/remoting/zookeeper/facade.go +++ b/remoting/zookeeper/facade.go @@ -30,21 +30,24 @@ type ZkClientFacade interface { SetZkClient(*ZookeeperClient) ZkClientLock() *sync.Mutex WaitGroup() *sync.WaitGroup // for wait group control, zk client listener & zk client container - Done() chan struct{} // for zk client control + Done() chan struct{} // for registry destroy RestartCallBack() bool GetUrl() *common.URL } // HandleClientRestart keeps the connection between client and server func HandleClientRestart(r ZkClientFacade) { + defer r.WaitGroup().Done() for { select { case <-r.ZkClient().Reconnect(): r.RestartCallBack() time.Sleep(10 * time.Microsecond) case <-r.Done(): - logger.Warnf("receive registry destroy, so HandleClientRestart quit") - r.WaitGroup().Done() + logger.Warnf("receive registry destroy event, quit client restart handler") + return + case <-r.ZkClient().CloseConn(): + logger.Warnf("receive zk client close event, quit client restart handler") return } } From 186a8e7d56a73398a27ea6b2ffc4e4a5526a2751 Mon Sep 17 00:00:00 2001 From: wangwx Date: Sat, 23 Jan 2021 18:01:57 +0800 Subject: [PATCH 05/35] fix imports format and ut --- config_center/zookeeper/impl.go | 8 ++++++-- registry/kubernetes/registry.go | 7 +++++-- registry/zookeeper/listener.go | 8 ++++++-- registry/zookeeper/registry.go | 6 +++++- registry/zookeeper/service_discovery.go | 8 +++++--- remoting/zookeeper/client.go | 8 ++++++-- remoting/zookeeper/client_test.go | 7 ++++++- remoting/zookeeper/facade.go | 2 ++ remoting/zookeeper/facade_test.go | 7 ++++++- remoting/zookeeper/listener.go | 6 +++++- remoting/zookeeper/listener_test.go | 9 +++++++-- 11 files changed, 59 insertions(+), 17 deletions(-) diff --git a/config_center/zookeeper/impl.go b/config_center/zookeeper/impl.go index 8333088a21..7a22f78177 100644 --- a/config_center/zookeeper/impl.go +++ b/config_center/zookeeper/impl.go @@ -20,16 +20,20 @@ package zookeeper import ( "strings" "sync" +) - gxset "github.com/dubbogo/gost/container/set" +import ( + perrors "github.com/pkg/errors" +) +import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/logger" "github.com/apache/dubbo-go/config_center" "github.com/apache/dubbo-go/config_center/parser" "github.com/apache/dubbo-go/remoting/zookeeper" - perrors "github.com/pkg/errors" + gxset "github.com/dubbogo/gost/container/set" ) const ( diff --git a/registry/kubernetes/registry.go b/registry/kubernetes/registry.go index 115f211217..a26478f2ee 100644 --- a/registry/kubernetes/registry.go +++ b/registry/kubernetes/registry.go @@ -22,18 +22,21 @@ import ( "path" "sync" "time" +) +import ( getty "github.com/apache/dubbo-getty" - perrors "github.com/pkg/errors" + v1 "k8s.io/api/core/v1" +) +import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/extension" "github.com/apache/dubbo-go/common/logger" "github.com/apache/dubbo-go/registry" "github.com/apache/dubbo-go/remoting/kubernetes" - v1 "k8s.io/api/core/v1" ) const ( diff --git a/registry/zookeeper/listener.go b/registry/zookeeper/listener.go index 53084c15dd..453cb57418 100644 --- a/registry/zookeeper/listener.go +++ b/registry/zookeeper/listener.go @@ -20,14 +20,18 @@ package zookeeper import ( "strings" "sync" +) + +import ( + perrors "github.com/pkg/errors" +) +import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/logger" "github.com/apache/dubbo-go/config_center" "github.com/apache/dubbo-go/registry" "github.com/apache/dubbo-go/remoting" - perrors "github.com/pkg/errors" - zk "github.com/apache/dubbo-go/remoting/zookeeper" ) diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go index 838164607c..bce8eb531c 100644 --- a/registry/zookeeper/registry.go +++ b/registry/zookeeper/registry.go @@ -23,16 +23,20 @@ import ( "path" "sync" "time" +) +import ( "github.com/dubbogo/go-zookeeper/zk" + perrors "github.com/pkg/errors" +) +import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/extension" "github.com/apache/dubbo-go/common/logger" "github.com/apache/dubbo-go/registry" "github.com/apache/dubbo-go/remoting/zookeeper" - perrors "github.com/pkg/errors" ) const ( diff --git a/registry/zookeeper/service_discovery.go b/registry/zookeeper/service_discovery.go index 004fa9733c..6ac10f9b16 100644 --- a/registry/zookeeper/service_discovery.go +++ b/registry/zookeeper/service_discovery.go @@ -23,11 +23,14 @@ import ( "strconv" "strings" "sync" - +) +import ( gxset "github.com/dubbogo/gost/container/set" - gxpage "github.com/dubbogo/gost/hash/page" + perrors "github.com/pkg/errors" +) +import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/extension" @@ -37,7 +40,6 @@ import ( "github.com/apache/dubbo-go/remoting" "github.com/apache/dubbo-go/remoting/zookeeper" "github.com/apache/dubbo-go/remoting/zookeeper/curator_discovery" - perrors "github.com/pkg/errors" ) const ( diff --git a/remoting/zookeeper/client.go b/remoting/zookeeper/client.go index ba67d85099..4df4a2b20c 100644 --- a/remoting/zookeeper/client.go +++ b/remoting/zookeeper/client.go @@ -23,12 +23,16 @@ import ( "sync" "sync/atomic" "time" +) +import ( "github.com/dubbogo/go-zookeeper/zk" + perrors "github.com/pkg/errors" +) +import ( "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/logger" - perrors "github.com/pkg/errors" ) const ( @@ -232,7 +236,7 @@ func NewMockZookeeperClient(name string, timeout time.Duration, opts ...Option) if err != nil { return nil, nil, nil, perrors.WithMessagef(err, "zk.Connect") } - + atomic.StoreUint32(&z.valid, 1) return ts, z, event, nil } diff --git a/remoting/zookeeper/client_test.go b/remoting/zookeeper/client_test.go index a5aa98c22f..4cff1340ec 100644 --- a/remoting/zookeeper/client_test.go +++ b/remoting/zookeeper/client_test.go @@ -20,12 +20,17 @@ package zookeeper import ( "testing" "time" +) - "github.com/apache/dubbo-go/common/logger" +import ( "github.com/dubbogo/go-zookeeper/zk" "github.com/stretchr/testify/assert" ) +import ( + "github.com/apache/dubbo-go/common/logger" +) + func verifyEventStateOrder(t *testing.T, c <-chan zk.Event, expectedStates []zk.State, source string) { for _, state := range expectedStates { for { diff --git a/remoting/zookeeper/facade.go b/remoting/zookeeper/facade.go index 92c3ea7230..4aa327fb0d 100644 --- a/remoting/zookeeper/facade.go +++ b/remoting/zookeeper/facade.go @@ -20,7 +20,9 @@ package zookeeper import ( "sync" "time" +) +import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/logger" ) diff --git a/remoting/zookeeper/facade_test.go b/remoting/zookeeper/facade_test.go index 5e9382ace6..dd01fc21a2 100644 --- a/remoting/zookeeper/facade_test.go +++ b/remoting/zookeeper/facade_test.go @@ -21,12 +21,17 @@ import ( "sync" "testing" "time" +) - "github.com/apache/dubbo-go/common" +import ( "github.com/dubbogo/go-zookeeper/zk" "github.com/stretchr/testify/assert" ) +import ( + "github.com/apache/dubbo-go/common" +) + type mockFacade struct { client *ZookeeperClient cltLock sync.Mutex diff --git a/remoting/zookeeper/listener.go b/remoting/zookeeper/listener.go index b34a16c3a2..d752cdafc4 100644 --- a/remoting/zookeeper/listener.go +++ b/remoting/zookeeper/listener.go @@ -22,15 +22,19 @@ import ( "strings" "sync" "time" +) +import ( getty "github.com/apache/dubbo-getty" "github.com/dubbogo/go-zookeeper/zk" + perrors "github.com/pkg/errors" +) +import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/logger" "github.com/apache/dubbo-go/remoting" - perrors "github.com/pkg/errors" ) var ( diff --git a/remoting/zookeeper/listener_test.go b/remoting/zookeeper/listener_test.go index 760fe8f176..f56bd95c9f 100644 --- a/remoting/zookeeper/listener_test.go +++ b/remoting/zookeeper/listener_test.go @@ -22,13 +22,18 @@ import ( "sync" "testing" "time" +) - "github.com/apache/dubbo-go/common/logger" - "github.com/apache/dubbo-go/remoting" +import ( "github.com/dubbogo/go-zookeeper/zk" "github.com/stretchr/testify/assert" ) +import ( + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/remoting" +) + var ( dubboPropertiesPath = "/dubbo/dubbo.properties" ) From a53ed2bcb063e0e7bbf05fc900971a188fdcd054 Mon Sep 17 00:00:00 2001 From: wangwx Date: Sat, 23 Jan 2021 18:09:16 +0800 Subject: [PATCH 06/35] fix import fmt --- config_center/zookeeper/impl.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config_center/zookeeper/impl.go b/config_center/zookeeper/impl.go index 7a22f78177..d9db75cc33 100644 --- a/config_center/zookeeper/impl.go +++ b/config_center/zookeeper/impl.go @@ -23,6 +23,7 @@ import ( ) import ( + gxset "github.com/dubbogo/gost/container/set" perrors "github.com/pkg/errors" ) @@ -33,7 +34,6 @@ import ( "github.com/apache/dubbo-go/config_center" "github.com/apache/dubbo-go/config_center/parser" "github.com/apache/dubbo-go/remoting/zookeeper" - gxset "github.com/dubbogo/gost/container/set" ) const ( @@ -206,9 +206,9 @@ func (c *zookeeperDynamicConfiguration) IsAvailable() bool { } func (c *zookeeperDynamicConfiguration) closeConfigs() { + logger.Infof("begin to close provider zk client") c.cltLock.Lock() defer c.cltLock.Unlock() - logger.Infof("begin to close provider zk client") c.client = nil } From bd59cfcc1afb4fd54b947970cd6c4abfd8070f5f Mon Sep 17 00:00:00 2001 From: wangwx Date: Sun, 24 Jan 2021 13:40:31 +0800 Subject: [PATCH 07/35] fix ut error --- registry/zookeeper/listener.go | 3 ++- registry/zookeeper/registry.go | 20 +++++++++----------- registry/zookeeper/registry_test.go | 7 +++++-- remoting/zookeeper/listener.go | 13 +++++++++++++ 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/registry/zookeeper/listener.go b/registry/zookeeper/listener.go index 453cb57418..2c61a49705 100644 --- a/registry/zookeeper/listener.go +++ b/registry/zookeeper/listener.go @@ -56,12 +56,13 @@ func (l *RegistryDataListener) SubscribeURL(url *common.URL, listener config_cen l.subscribed[url.ServiceKey()] = listener } -// UnSubscribeURL is used to set a watch listener for url +// UnSubscribeURL is used to unset a watch listener for url func (l *RegistryDataListener) UnSubscribeURL(url *common.URL) config_center.ConfigurationListener { if l.closed { return nil } listener := l.subscribed[url.ServiceKey()] + listener.(*RegistryConfigurationListener).Close() delete(l.subscribed, url.ServiceKey()) return listener } diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go index bce8eb531c..fe492c2b12 100644 --- a/registry/zookeeper/registry.go +++ b/registry/zookeeper/registry.go @@ -77,7 +77,7 @@ func newZkRegistry(url *common.URL) (registry.Registry, error) { if err != nil { return nil, err } - r.WaitGroup().Add(1) //zk client start successful, then wg +1 + go zookeeper.HandleClientRestart(r) r.listener = zookeeper.NewZkEventListener(r.client) @@ -129,7 +129,7 @@ func (r *zkRegistry) InitListeners() { defer oldDataListener.mutex.Unlock() r.dataListener.closed = true recovered := r.dataListener.subscribed - if len(recovered) > 0 { + if recovered != nil && len(recovered) > 0 { // recover all subscribed url for _, oldListener := range recovered { var ( @@ -178,6 +178,7 @@ func (r *zkRegistry) DoUnsubscribe(conf *common.URL) (registry.Listener, error) // CloseAndNilClient closes listeners and clear client func (r *zkRegistry) CloseAndNilClient() { + r.client.Close() r.client = nil } @@ -250,7 +251,8 @@ func (r *zkRegistry) getListener(conf *common.URL) (*RegistryConfigurationListen dataListener.mutex.Lock() defer dataListener.mutex.Unlock() if r.dataListener.subscribed[conf.ServiceKey()] != nil { - zkListener, _ = r.dataListener.subscribed[conf.ServiceKey()].(*RegistryConfigurationListener) + + zkListener, _ := r.dataListener.subscribed[conf.ServiceKey()].(*RegistryConfigurationListener) if zkListener != nil { r.listenerLock.Lock() defer r.listenerLock.Unlock() @@ -282,11 +284,7 @@ func (r *zkRegistry) getListener(conf *common.URL) (*RegistryConfigurationListen //Interested register to dataconfig. r.dataListener.SubscribeURL(conf, zkListener) - go r.listener.ListenServiceEvent( - conf, - fmt.Sprintf("/dubbo/%s/"+constant.DEFAULT_CATEGORY, url.QueryEscape(conf.Service())), - r.dataListener, - ) + go r.listener.ListenServiceEvent(conf, fmt.Sprintf("/dubbo/%s/"+constant.DEFAULT_CATEGORY, url.QueryEscape(conf.Service())), r.dataListener) return zkListener, nil } @@ -297,9 +295,9 @@ func (r *zkRegistry) getCloseListener(conf *common.URL) (*RegistryConfigurationL r.dataListener.mutex.Lock() configurationListener := r.dataListener.subscribed[conf.ServiceKey()] if configurationListener != nil { - rcListener, _ := configurationListener.(*RegistryConfigurationListener) - if rcListener != nil { - if rcListener.isClosed { + zkListener, _ := configurationListener.(*RegistryConfigurationListener) + if zkListener != nil { + if zkListener.isClosed { r.dataListener.mutex.Unlock() return nil, perrors.New("configListener already been closed") } diff --git a/registry/zookeeper/registry_test.go b/registry/zookeeper/registry_test.go index 5959a903bc..e093175a29 100644 --- a/registry/zookeeper/registry_test.go +++ b/registry/zookeeper/registry_test.go @@ -37,11 +37,14 @@ func Test_Register(t *testing.T) { regURL, _ := common.NewURL("registry://127.0.0.1:1111", common.WithParamsValue(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER))) url, _ := common.NewURL("dubbo://127.0.0.1:20000/com.ikurento.user.UserProvider", common.WithParamsValue(constant.CLUSTER_KEY, "mock"), common.WithParamsValue("serviceid", "soa.mock"), common.WithMethods([]string{"GetUser", "AddUser"})) - ts, reg, _ := newMockZkRegistry(regURL) + ts, reg, err := newMockZkRegistry(regURL) + if err != nil { + assert.NoError(t, err) + } defer func() { _ = ts.Stop() }() - err := reg.Register(url) + err = reg.Register(url) children, _ := reg.client.GetChildren("/dubbo/com.ikurento.user.UserProvider/providers") assert.Regexp(t, ".*dubbo%3A%2F%2F127.0.0.1%3A20000%2Fcom.ikurento.user.UserProvider%3Fanyhost%3Dtrue%26cluster%3Dmock%26.*.serviceid%3Dsoa.mock", children) assert.NoError(t, err) diff --git a/remoting/zookeeper/listener.go b/remoting/zookeeper/listener.go index d752cdafc4..a0f3f28027 100644 --- a/remoting/zookeeper/listener.go +++ b/remoting/zookeeper/listener.go @@ -47,6 +47,7 @@ type ZkEventListener struct { pathMapLock sync.Mutex pathMap map[string]struct{} wg sync.WaitGroup + exit chan struct{} } // NewZkEventListener returns a EventListener instance @@ -54,6 +55,7 @@ func NewZkEventListener(client *ZookeeperClient) *ZkEventListener { return &ZkEventListener{ client: client, pathMap: make(map[string]struct{}), + exit: make(chan struct{}), } } @@ -116,6 +118,8 @@ func (l *ZkEventListener) listenServiceNodeEvent(zkPath string, listener ...remo logger.Warnf("zk.ExistW(key{%s}) = event{EventNodeDeleted}", zkPath) return true } + case <-l.exit: + return false } } } @@ -244,6 +248,10 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen case <-getty.GetTimeWheel().After(timeSecondDuration(failTimes * ConnDelay)): l.client.UnregisterEvent(zkPath, &event) continue + case <-l.exit: + l.client.UnregisterEvent(zkPath, &event) + logger.Warnf("listen(path{%s}) goroutine exit now...", zkPath) + return case <-event: logger.Infof("get zk.EventNodeDataChange notify event") l.client.UnregisterEvent(zkPath, &event) @@ -331,6 +339,10 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen } l.handleZkNodeEvent(zkEvent.Path, children, listener) break WATCH + case <-l.exit: + logger.Warnf("listen(path{%s}) goroutine exit now...", zkPath) + ticker.Stop() + return } } @@ -360,5 +372,6 @@ func (l *ZkEventListener) ListenServiceEvent(conf *common.URL, zkPath string, li // Close will let client listen exit func (l *ZkEventListener) Close() { + close(l.exit) l.wg.Wait() } From ead5951fd98651cef5dd89b0bca77d848eae14ee Mon Sep 17 00:00:00 2001 From: wangwx Date: Sun, 24 Jan 2021 13:58:27 +0800 Subject: [PATCH 08/35] fix ut error --- remoting/zookeeper/client.go | 8 -------- remoting/zookeeper/facade.go | 3 --- remoting/zookeeper/facade_test.go | 2 -- 3 files changed, 13 deletions(-) diff --git a/remoting/zookeeper/client.go b/remoting/zookeeper/client.go index 4df4a2b20c..42dfbe5ad7 100644 --- a/remoting/zookeeper/client.go +++ b/remoting/zookeeper/client.go @@ -63,7 +63,6 @@ type ZookeeperClient struct { Wait sync.WaitGroup valid uint32 reconnectCh chan struct{} - closeCh chan struct{} eventRegistry map[string][]*chan struct{} eventRegistryLock sync.RWMutex } @@ -178,7 +177,6 @@ func NewZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (* ZkAddrs: zkAddrs, Timeout: timeout, reconnectCh: make(chan struct{}), - closeCh: make(chan struct{}), eventRegistry: make(map[string][]*chan struct{}), } // connect to zookeeper @@ -213,7 +211,6 @@ func NewMockZookeeperClient(name string, timeout time.Duration, opts ...Option) ZkAddrs: []string{}, Timeout: timeout, reconnectCh: make(chan struct{}), - closeCh: make(chan struct{}), eventRegistry: make(map[string][]*chan struct{}), } @@ -603,11 +600,6 @@ func (z *ZookeeperClient) Reconnect() <-chan struct{} { return z.reconnectCh } -// CloseConn gets zookeeper client close event -func (z *ZookeeperClient) CloseConn() <-chan struct{} { - return z.closeCh -} - // In my opinion, this method should never called by user, here just for lint func (z *ZookeeperClient) Close() { z.Conn.Close() diff --git a/remoting/zookeeper/facade.go b/remoting/zookeeper/facade.go index 4aa327fb0d..b2e350f00e 100644 --- a/remoting/zookeeper/facade.go +++ b/remoting/zookeeper/facade.go @@ -48,9 +48,6 @@ func HandleClientRestart(r ZkClientFacade) { case <-r.Done(): logger.Warnf("receive registry destroy event, quit client restart handler") return - case <-r.ZkClient().CloseConn(): - logger.Warnf("receive zk client close event, quit client restart handler") - return } } } diff --git a/remoting/zookeeper/facade_test.go b/remoting/zookeeper/facade_test.go index dd01fc21a2..3fbecf79f4 100644 --- a/remoting/zookeeper/facade_test.go +++ b/remoting/zookeeper/facade_test.go @@ -100,6 +100,4 @@ func Test_Facade(t *testing.T) { go HandleClientRestart(mock) states := []zk.State{zk.StateConnecting, zk.StateConnected, zk.StateHasSession} verifyEventStateOrder(t, event, states, "event channel") - verifyEventStateOrder(t, event, []zk.State{zk.StateDisconnected}, "event channel") - //time.Sleep(2e9) } From bb84695c6a535b6d83da8efdc25c9110cadac6be Mon Sep 17 00:00:00 2001 From: wangwx Date: Sun, 24 Jan 2021 15:08:10 +0800 Subject: [PATCH 09/35] fix ut --- registry/zookeeper/registry.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go index fe492c2b12..7bab1d1deb 100644 --- a/registry/zookeeper/registry.go +++ b/registry/zookeeper/registry.go @@ -251,8 +251,7 @@ func (r *zkRegistry) getListener(conf *common.URL) (*RegistryConfigurationListen dataListener.mutex.Lock() defer dataListener.mutex.Unlock() if r.dataListener.subscribed[conf.ServiceKey()] != nil { - - zkListener, _ := r.dataListener.subscribed[conf.ServiceKey()].(*RegistryConfigurationListener) + zkListener, _ = r.dataListener.subscribed[conf.ServiceKey()].(*RegistryConfigurationListener) if zkListener != nil { r.listenerLock.Lock() defer r.listenerLock.Unlock() From 394cbb257b52e74758bfc3fa46c67394173da4a9 Mon Sep 17 00:00:00 2001 From: wangwx Date: Sun, 24 Jan 2021 15:14:03 +0800 Subject: [PATCH 10/35] fix lint --- registry/zookeeper/registry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go index 7bab1d1deb..c8f4b4775e 100644 --- a/registry/zookeeper/registry.go +++ b/registry/zookeeper/registry.go @@ -294,7 +294,7 @@ func (r *zkRegistry) getCloseListener(conf *common.URL) (*RegistryConfigurationL r.dataListener.mutex.Lock() configurationListener := r.dataListener.subscribed[conf.ServiceKey()] if configurationListener != nil { - zkListener, _ := configurationListener.(*RegistryConfigurationListener) + zkListener, _ = configurationListener.(*RegistryConfigurationListener) if zkListener != nil { if zkListener.isClosed { r.dataListener.mutex.Unlock() From 930a15bf9655b184f86c346bdfdd790fd7a9a7cd Mon Sep 17 00:00:00 2001 From: wangwx Date: Mon, 25 Jan 2021 10:47:46 +0800 Subject: [PATCH 11/35] try to fix ut --- config_center/zookeeper/impl_test.go | 38 +++++++++++++++++++--------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/config_center/zookeeper/impl_test.go b/config_center/zookeeper/impl_test.go index a518bb6ec0..8884be4b55 100644 --- a/config_center/zookeeper/impl_test.go +++ b/config_center/zookeeper/impl_test.go @@ -41,9 +41,14 @@ const ( dubboPropertyFileName = "dubbo.properties" ) -func initZkData(group string, t *testing.T) (*zk.TestCluster, *zookeeperDynamicConfiguration) { - ts, err := zk.StartTestCluster(1, nil, nil) +var ts *zk.TestCluster + +func InitTestCluster(t *testing.T) { + var err error + ts, err = zk.StartTestCluster(1, nil, nil) assert.NoError(t, err) +} +func initZkData(group string, t *testing.T) (*zk.TestCluster, *zookeeperDynamicConfiguration) { assert.NotNil(t, ts.Servers[0]) urlString := "registry://127.0.0.1:" + strconv.Itoa(ts.Servers[0].Port) regurl, err := common.NewURL(urlString) @@ -97,11 +102,22 @@ func initZkData(group string, t *testing.T) (*zk.TestCluster, *zookeeperDynamicC return ts, zreg } +func deleteDubboPath(zreg *zookeeperDynamicConfiguration, group string, t *testing.T) { + var err error + if group != "" { + err = zreg.client.Delete(path.Join(zreg.rootPath, "dubbo", dubboPropertyFileName)) + assert.NoError(t, err) + } else { + err = zreg.client.Delete(path.Join(zreg.rootPath, dubboPropertyFileName)) + assert.NoError(t, err) + } +} + func TestGetConfig(t *testing.T) { - ts, reg := initZkData("dubbo", t) + InitTestCluster(t) + _, reg := initZkData("dubbo", t) defer func() { - err := ts.Stop() - assert.NoError(t, err) + deleteDubboPath(reg, "dubbo", t) }() configs, err := reg.GetProperties(dubboPropertyFileName, config_center.WithGroup("dubbo")) assert.NoError(t, err) @@ -120,10 +136,9 @@ func TestGetConfig(t *testing.T) { } func TestAddListener(t *testing.T) { - ts, reg := initZkData("", t) + _, reg := initZkData("", t) defer func() { - err := ts.Stop() - assert.NoError(t, err) + deleteDubboPath(reg, "", t) }() listener := &mockDataListener{} reg.AddListener(dubboPropertyFileName, listener) @@ -156,10 +171,9 @@ func TestAddListener(t *testing.T) { } func TestRemoveListener(t *testing.T) { - ts, reg := initZkData("", t) + _, reg := initZkData("", t) defer func() { - err := ts.Stop() - assert.NoError(t, err) + deleteDubboPath(reg, "", t) }() listener := &mockDataListener{} reg.AddListener(dubboPropertyFileName, listener) @@ -197,7 +211,7 @@ func TestZookeeperDynamicConfigurationPublishConfig(t *testing.T) { value := "Test Data" customGroup := "Custom Group" key := "myKey" - ts, zk := initZkData(config_center.DEFAULT_GROUP, t) + _, zk := initZkData(config_center.DEFAULT_GROUP, t) defer func() { err := ts.Stop() assert.NoError(t, err) From 7df64264ab68f63b5e63b09912e0aa6ecdc509a7 Mon Sep 17 00:00:00 2001 From: wangwx Date: Mon, 25 Jan 2021 11:41:18 +0800 Subject: [PATCH 12/35] fix ut --- registry/zookeeper/service_discovery_test.go | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/registry/zookeeper/service_discovery_test.go b/registry/zookeeper/service_discovery_test.go index c9e14afd50..a73ecc9965 100644 --- a/registry/zookeeper/service_discovery_test.go +++ b/registry/zookeeper/service_discovery_test.go @@ -37,11 +37,14 @@ import ( var testName = "test" +var tc *zk.TestCluster + func prepareData(t *testing.T) *zk.TestCluster { - ts, err := zk.StartTestCluster(1, nil, nil) + var err error + tc, err = zk.StartTestCluster(1, nil, nil) assert.NoError(t, err) - assert.NotNil(t, ts.Servers[0]) - address := "127.0.0.1:" + strconv.Itoa(ts.Servers[0].Port) + assert.NotNil(t, tc.Servers[0]) + address := "127.0.0.1:" + strconv.Itoa(tc.Servers[0].Port) config.GetBaseConfig().ServiceDiscoveries[testName] = &config.ServiceDiscoveryConfig{ Protocol: "zookeeper", @@ -52,7 +55,7 @@ func prepareData(t *testing.T) *zk.TestCluster { Address: address, TimeoutStr: "10s", } - return ts + return tc } func TestNewZookeeperServiceDiscovery(t *testing.T) { @@ -74,10 +77,7 @@ func TestNewZookeeperServiceDiscovery(t *testing.T) { } func TestCURDZookeeperServiceDiscovery(t *testing.T) { - ts := prepareData(t) - defer func() { - _ = ts.Stop() - }() + prepareData(t) sd, err := newZookeeperServiceDiscovery(testName) assert.Nil(t, err) defer func() { @@ -143,9 +143,8 @@ func TestCURDZookeeperServiceDiscovery(t *testing.T) { } func TestAddListenerZookeeperServiceDiscovery(t *testing.T) { - ts := prepareData(t) defer func() { - _ = ts.Stop() + _ = tc.Stop() }() sd, err := newZookeeperServiceDiscovery(testName) assert.Nil(t, err) From 93ae3374a690e434be48fe73a2b53fe3a17899a9 Mon Sep 17 00:00:00 2001 From: wangwx Date: Mon, 25 Jan 2021 12:18:51 +0800 Subject: [PATCH 13/35] fix ut --- cluster/router/tag/tag_router_test.go | 6 +++--- remoting/zookeeper/client.go | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cluster/router/tag/tag_router_test.go b/cluster/router/tag/tag_router_test.go index 26c4b8352b..e29182100c 100644 --- a/cluster/router/tag/tag_router_test.go +++ b/cluster/router/tag/tag_router_test.go @@ -308,9 +308,9 @@ tags: } func (suite *DynamicTagRouter) TearDownTest() { - suite.zkClient.Close() - err := suite.testCluster.Stop() - suite.Nil(err) + //suite.zkClient.Close() + //err := suite.testCluster.Stop() + //suite.Nil(err) } func (suite *DynamicTagRouter) TestDynamicTagRouterSetByIPv4() { diff --git a/remoting/zookeeper/client.go b/remoting/zookeeper/client.go index 42dfbe5ad7..da66d7b8f7 100644 --- a/remoting/zookeeper/client.go +++ b/remoting/zookeeper/client.go @@ -604,3 +604,12 @@ func (z *ZookeeperClient) Reconnect() <-chan struct{} { func (z *ZookeeperClient) Close() { z.Conn.Close() } + +func CloseZookeeperClient() { + if atomic.LoadUint32(&clientHaveCreated) == 1 { + mux.Lock() + defer mux.Unlock() + zkClient.Conn.Close() + zkClient = nil + } +} From 2cb436bf36e0ff1376f04c89a11e21986b273bed Mon Sep 17 00:00:00 2001 From: wangwx Date: Mon, 25 Jan 2021 18:24:07 +0800 Subject: [PATCH 14/35] so tired to fix the ut --- cluster/router/chain/chain_test.go | 43 +++++++++------------ cluster/router/condition/app_router_test.go | 20 +++++----- remoting/zookeeper/client.go | 16 ++++---- 3 files changed, 36 insertions(+), 43 deletions(-) diff --git a/cluster/router/chain/chain_test.go b/cluster/router/chain/chain_test.go index 1bb7124a4f..dcd157ab77 100644 --- a/cluster/router/chain/chain_test.go +++ b/cluster/router/chain/chain_test.go @@ -25,6 +25,7 @@ import ( ) import ( + zk "github.com/dubbogo/go-zookeeper/zk" "github.com/stretchr/testify/assert" ) @@ -53,16 +54,19 @@ const ( consumerFormat = "consumer://%s/com.foo.BarService" dubboForamt = "dubbo://%s:%d/com.foo.BarService" anyUrlFormat = "condition://%s/com.foo.BarService" - zk = "zookeeper" + zkName = "zookeeper" applicationKey = "test-condition" applicationField = "application" forceField = "force" forceValue = "true" ) +var zkCluster *zk.TestCluster + func TestNewRouterChain(t *testing.T) { ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second) assert.NoError(t, err) + zkCluster = ts err = z.Create(path) assert.NoError(t, err) testyml := `scope: application @@ -77,12 +81,11 @@ conditions: _, err = z.Conn.Set(path, []byte(testyml), 0) assert.NoError(t, err) defer func() { - _ = ts.Stop() - z.Close() + z.Delete(path) }() zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, ts.Servers[0].Port)) - configuration, err := extension.GetConfigCenterFactory(zk).GetDynamicConfiguration(zkUrl) + configuration, err := extension.GetConfigCenterFactory(zkName).GetDynamicConfiguration(zkUrl) config.GetEnvInstance().SetDynamicConfiguration(configuration) assert.Nil(t, err) @@ -114,7 +117,7 @@ func TestNewRouterChainURLNil(t *testing.T) { } func TestRouterChainAddRouters(t *testing.T) { - ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second) + _, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second, zookeeper.WithTestCluster(zkCluster)) assert.NoError(t, err) err = z.Create(path) assert.NoError(t, err) @@ -131,13 +134,11 @@ conditions: _, err = z.Conn.Set(path, []byte(testyml), 0) assert.NoError(t, err) defer func() { - _ = ts.Stop() - assert.NoError(t, err) - z.Close() + z.Delete(path) }() - zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, ts.Servers[0].Port)) - configuration, err := extension.GetConfigCenterFactory(zk).GetDynamicConfiguration(zkUrl) + zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, zkCluster.Servers[0].Port)) + configuration, err := extension.GetConfigCenterFactory(zkName).GetDynamicConfiguration(zkUrl) assert.NoError(t, err) config.GetEnvInstance().SetDynamicConfiguration(configuration) @@ -159,15 +160,9 @@ conditions: } func TestRouterChainRoute(t *testing.T) { - ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second) - defer func() { - err = ts.Stop() - assert.NoError(t, err) - z.Close() - }() - + ts, _, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second, zookeeper.WithTestCluster(zkCluster)) zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, ts.Servers[0].Port)) - configuration, err := extension.GetConfigCenterFactory(zk).GetDynamicConfiguration(zkUrl) + configuration, err := extension.GetConfigCenterFactory(zkName).GetDynamicConfiguration(zkUrl) assert.NoError(t, err) config.GetEnvInstance().SetDynamicConfiguration(configuration) @@ -192,7 +187,7 @@ func TestRouterChainRoute(t *testing.T) { } func TestRouterChainRouteAppRouter(t *testing.T) { - ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second) + ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second, zookeeper.WithTestCluster(zkCluster)) assert.NoError(t, err) err = z.Create(path) assert.NoError(t, err) @@ -209,13 +204,11 @@ conditions: _, err = z.Conn.Set(path, []byte(testyml), 0) assert.NoError(t, err) defer func() { - _ = ts.Stop() - assert.NoError(t, err) - z.Close() + z.Delete(path) }() zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, ts.Servers[0].Port)) - configuration, err := extension.GetConfigCenterFactory(zk).GetDynamicConfiguration(zkUrl) + configuration, err := extension.GetConfigCenterFactory(zkName).GetDynamicConfiguration(zkUrl) assert.NoError(t, err) config.GetEnvInstance().SetDynamicConfiguration(configuration) @@ -237,7 +230,7 @@ conditions: } func TestRouterChainRouteNoRoute(t *testing.T) { - ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second) + ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second, zookeeper.WithTestCluster(zkCluster)) assert.Nil(t, err) defer func() { _ = ts.Stop() @@ -246,7 +239,7 @@ func TestRouterChainRouteNoRoute(t *testing.T) { }() zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, ts.Servers[0].Port)) - configuration, err := extension.GetConfigCenterFactory(zk).GetDynamicConfiguration(zkUrl) + configuration, err := extension.GetConfigCenterFactory(zkName).GetDynamicConfiguration(zkUrl) config.GetEnvInstance().SetDynamicConfiguration(configuration) assert.Nil(t, err) diff --git a/cluster/router/condition/app_router_test.go b/cluster/router/condition/app_router_test.go index c8bc43eb33..dad659b307 100644 --- a/cluster/router/condition/app_router_test.go +++ b/cluster/router/condition/app_router_test.go @@ -67,11 +67,11 @@ conditions: _, err = z.Conn.Set(routerPath, []byte(testYML), 0) assert.NoError(t, err) - defer func() { - err = ts.Stop() - assert.NoError(t, err) - z.Close() - }() + //defer func() { + // err = ts.Stop() + // assert.NoError(t, err) + // z.Close() + //}() zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, routerLocalIP, ts.Servers[0].Port)) configuration, err := extension.GetConfigCenterFactory(routerZk).GetDynamicConfiguration(zkUrl) @@ -118,11 +118,11 @@ conditions: _, err = z.Conn.Set(routerPath, []byte(testYML), 0) assert.NoError(t, err) - defer func() { - err = ts.Stop() - assert.NoError(t, err) - z.Close() - }() + //defer func() { + // err = ts.Stop() + // assert.NoError(t, err) + // z.Close() + //}() zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, routerLocalIP, ts.Servers[0].Port)) configuration, err := extension.GetConfigCenterFactory(routerZk).GetDynamicConfiguration(zkUrl) diff --git a/remoting/zookeeper/client.go b/remoting/zookeeper/client.go index da66d7b8f7..c6f5f54d83 100644 --- a/remoting/zookeeper/client.go +++ b/remoting/zookeeper/client.go @@ -605,11 +605,11 @@ func (z *ZookeeperClient) Close() { z.Conn.Close() } -func CloseZookeeperClient() { - if atomic.LoadUint32(&clientHaveCreated) == 1 { - mux.Lock() - defer mux.Unlock() - zkClient.Conn.Close() - zkClient = nil - } -} +//func closeZookeeperClient() { +// if atomic.LoadUint32(&clientHaveCreated) == 1 { +// mux.Lock() +// defer mux.Unlock() +// zkClient.Conn.Close() +// zkClient = nil +// } +//} From 543721c5468fcfca9af654484b80343d4f06c168 Mon Sep 17 00:00:00 2001 From: wangwx Date: Mon, 25 Jan 2021 19:17:10 +0800 Subject: [PATCH 15/35] fix lint --- cluster/router/chain/chain_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cluster/router/chain/chain_test.go b/cluster/router/chain/chain_test.go index dcd157ab77..e4419ff8ea 100644 --- a/cluster/router/chain/chain_test.go +++ b/cluster/router/chain/chain_test.go @@ -161,6 +161,7 @@ conditions: func TestRouterChainRoute(t *testing.T) { ts, _, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second, zookeeper.WithTestCluster(zkCluster)) + assert.Nil(t, err) zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, ts.Servers[0].Port)) configuration, err := extension.GetConfigCenterFactory(zkName).GetDynamicConfiguration(zkUrl) assert.NoError(t, err) From 2bc815afca107f38cf4b8679cde45b203d2ca005 Mon Sep 17 00:00:00 2001 From: wangwx Date: Tue, 26 Jan 2021 14:20:20 +0800 Subject: [PATCH 16/35] remove client close from registry --- registry/zookeeper/registry.go | 1 - remoting/zookeeper/client.go | 9 --------- 2 files changed, 10 deletions(-) diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go index c8f4b4775e..bdd51c0d1a 100644 --- a/registry/zookeeper/registry.go +++ b/registry/zookeeper/registry.go @@ -178,7 +178,6 @@ func (r *zkRegistry) DoUnsubscribe(conf *common.URL) (registry.Listener, error) // CloseAndNilClient closes listeners and clear client func (r *zkRegistry) CloseAndNilClient() { - r.client.Close() r.client = nil } diff --git a/remoting/zookeeper/client.go b/remoting/zookeeper/client.go index c6f5f54d83..42dfbe5ad7 100644 --- a/remoting/zookeeper/client.go +++ b/remoting/zookeeper/client.go @@ -604,12 +604,3 @@ func (z *ZookeeperClient) Reconnect() <-chan struct{} { func (z *ZookeeperClient) Close() { z.Conn.Close() } - -//func closeZookeeperClient() { -// if atomic.LoadUint32(&clientHaveCreated) == 1 { -// mux.Lock() -// defer mux.Unlock() -// zkClient.Conn.Close() -// zkClient = nil -// } -//} From 0a215ac4633d9fc69f4648ac40a2c38b1a089bbb Mon Sep 17 00:00:00 2001 From: wangwx Date: Tue, 26 Jan 2021 19:45:09 +0800 Subject: [PATCH 17/35] fix provider not started --- protocol/protocolwrapper/protocol_filter_wrapper.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/protocol/protocolwrapper/protocol_filter_wrapper.go b/protocol/protocolwrapper/protocol_filter_wrapper.go index 679036f20e..448bd6f5a9 100644 --- a/protocol/protocolwrapper/protocol_filter_wrapper.go +++ b/protocol/protocolwrapper/protocol_filter_wrapper.go @@ -59,7 +59,11 @@ func (pfw *ProtocolFilterWrapper) Refer(url *common.URL) protocol.Invoker { if pfw.protocol == nil { pfw.protocol = extension.GetProtocol(url.Protocol) } - return buildInvokerChain(pfw.protocol.Refer(url), constant.REFERENCE_FILTER_KEY) + invoker := pfw.protocol.Refer(url) + if invoker == nil { + return nil + } + return buildInvokerChain(invoker, constant.REFERENCE_FILTER_KEY) } // Destroy will destroy all invoker and exporter. From 43280d7ff0a6e1693c4253b0aa99d0440f97218d Mon Sep 17 00:00:00 2001 From: wangwx Date: Thu, 25 Feb 2021 21:10:07 +0800 Subject: [PATCH 18/35] change some comments --- cluster/router/chain/chain_test.go | 3 ++ cluster/router/condition/app_router_test.go | 18 +++---- cluster/router/tag/tag_router_test.go | 4 +- config_center/zookeeper/impl.go | 1 + config_center/zookeeper/impl_test.go | 60 ++++++++++----------- registry/zookeeper/listener.go | 3 -- registry/zookeeper/registry.go | 1 + remoting/zookeeper/client.go | 49 +++++++++++------ remoting/zookeeper/client_test.go | 51 ++++++++++++++++++ 9 files changed, 127 insertions(+), 63 deletions(-) diff --git a/cluster/router/chain/chain_test.go b/cluster/router/chain/chain_test.go index dfc3987888..938b06b469 100644 --- a/cluster/router/chain/chain_test.go +++ b/cluster/router/chain/chain_test.go @@ -82,6 +82,7 @@ conditions: assert.NoError(t, err) defer func() { z.Delete(path) + z.Close() }() zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, ts.Servers[0].Port)) @@ -135,6 +136,7 @@ conditions: assert.NoError(t, err) defer func() { z.Delete(path) + z.Close() }() zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, zkCluster.Servers[0].Port)) @@ -211,6 +213,7 @@ conditions: assert.NoError(t, err) defer func() { z.Delete(path) + z.Close() }() zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, ts.Servers[0].Port)) diff --git a/cluster/router/condition/app_router_test.go b/cluster/router/condition/app_router_test.go index 3814392886..6dcfefc3d3 100644 --- a/cluster/router/condition/app_router_test.go +++ b/cluster/router/condition/app_router_test.go @@ -67,11 +67,10 @@ conditions: _, err = z.Conn.Set(routerPath, []byte(testYML), 0) assert.NoError(t, err) - //defer func() { - // err = ts.Stop() - // assert.NoError(t, err) - // z.Close() - //}() + defer func() { + assert.NoError(t, err) + z.Close() + }() zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, routerLocalIP, ts.Servers[0].Port)) configuration, err := extension.GetConfigCenterFactory(routerZk).GetDynamicConfiguration(zkUrl) @@ -123,11 +122,10 @@ conditions: _, err = z.Conn.Set(routerPath, []byte(testYML), 0) assert.NoError(t, err) - //defer func() { - // err = ts.Stop() - // assert.NoError(t, err) - // z.Close() - //}() + defer func() { + assert.NoError(t, err) + z.Close() + }() zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, routerLocalIP, ts.Servers[0].Port)) configuration, err := extension.GetConfigCenterFactory(routerZk).GetDynamicConfiguration(zkUrl) diff --git a/cluster/router/tag/tag_router_test.go b/cluster/router/tag/tag_router_test.go index 98e1ee8d61..9ef1661c21 100644 --- a/cluster/router/tag/tag_router_test.go +++ b/cluster/router/tag/tag_router_test.go @@ -333,9 +333,7 @@ tags: } func (suite *DynamicTagRouter) TearDownTest() { - //suite.zkClient.Close() - //err := suite.testCluster.Stop() - //suite.Nil(err) + suite.zkClient.Close() } func (suite *DynamicTagRouter) TestDynamicTagRouterSetByIPv4() { diff --git a/config_center/zookeeper/impl.go b/config_center/zookeeper/impl.go index d9db75cc33..ba1ce213f5 100644 --- a/config_center/zookeeper/impl.go +++ b/config_center/zookeeper/impl.go @@ -209,6 +209,7 @@ func (c *zookeeperDynamicConfiguration) closeConfigs() { logger.Infof("begin to close provider zk client") c.cltLock.Lock() defer c.cltLock.Unlock() + c.client.Close() c.client = nil } diff --git a/config_center/zookeeper/impl_test.go b/config_center/zookeeper/impl_test.go index 8884be4b55..01adb7bb51 100644 --- a/config_center/zookeeper/impl_test.go +++ b/config_center/zookeeper/impl_test.go @@ -41,14 +41,9 @@ const ( dubboPropertyFileName = "dubbo.properties" ) -var ts *zk.TestCluster - -func InitTestCluster(t *testing.T) { - var err error - ts, err = zk.StartTestCluster(1, nil, nil) - assert.NoError(t, err) -} func initZkData(group string, t *testing.T) (*zk.TestCluster, *zookeeperDynamicConfiguration) { + ts, err := zk.StartTestCluster(1, nil, nil) + assert.NoError(t, err) assert.NotNil(t, ts.Servers[0]) urlString := "registry://127.0.0.1:" + strconv.Itoa(ts.Servers[0].Port) regurl, err := common.NewURL(urlString) @@ -86,10 +81,10 @@ func initZkData(group string, t *testing.T) (*zk.TestCluster, *zookeeperDynamicC dubbo.service.com.ikurento.user.UserProvider.cluster=failover ` if group != "" { - err = zreg.client.Create(path.Join(zreg.rootPath, "dubbo", dubboPropertyFileName)) + err = zreg.client.Create(path.Join(zreg.rootPath, group, dubboPropertyFileName)) assert.NoError(t, err) - _, err = zreg.client.Conn.Set(path.Join(zreg.rootPath, "dubbo", dubboPropertyFileName), []byte(data), 0) + _, err = zreg.client.Conn.Set(path.Join(zreg.rootPath, group, dubboPropertyFileName), []byte(data), 0) assert.NoError(t, err) } else { err = zreg.client.Create(path.Join(zreg.rootPath, dubboPropertyFileName)) @@ -102,22 +97,12 @@ func initZkData(group string, t *testing.T) (*zk.TestCluster, *zookeeperDynamicC return ts, zreg } -func deleteDubboPath(zreg *zookeeperDynamicConfiguration, group string, t *testing.T) { - var err error - if group != "" { - err = zreg.client.Delete(path.Join(zreg.rootPath, "dubbo", dubboPropertyFileName)) - assert.NoError(t, err) - } else { - err = zreg.client.Delete(path.Join(zreg.rootPath, dubboPropertyFileName)) - assert.NoError(t, err) - } -} - func TestGetConfig(t *testing.T) { - InitTestCluster(t) - _, reg := initZkData("dubbo", t) + ts, reg := initZkData("dubbo", t) defer func() { - deleteDubboPath(reg, "dubbo", t) + reg.client.Close() + err := ts.Stop() + assert.NoError(t, err) }() configs, err := reg.GetProperties(dubboPropertyFileName, config_center.WithGroup("dubbo")) assert.NoError(t, err) @@ -135,13 +120,23 @@ func TestGetConfig(t *testing.T) { assert.Equal(t, "", configs) } +func printMap(key, value interface{}) bool { + fmt.Println(key, value) + return true +} + func TestAddListener(t *testing.T) { - _, reg := initZkData("", t) + ts, reg := initZkData("", t) defer func() { - deleteDubboPath(reg, "", t) + reg.client.Close() + err := ts.Stop() + assert.NoError(t, err) }() + reg.cacheListener.keyListeners.Range(printMap) listener := &mockDataListener{} reg.AddListener(dubboPropertyFileName, listener) + + reg.cacheListener.keyListeners.Range(printMap) listener.wg.Add(1) data := ` dubbo.consumer.request_timeout=3s @@ -171,9 +166,11 @@ func TestAddListener(t *testing.T) { } func TestRemoveListener(t *testing.T) { - _, reg := initZkData("", t) + ts, reg := initZkData("", t) defer func() { - deleteDubboPath(reg, "", t) + reg.client.Close() + err := ts.Stop() + assert.NoError(t, err) }() listener := &mockDataListener{} reg.AddListener(dubboPropertyFileName, listener) @@ -211,19 +208,20 @@ func TestZookeeperDynamicConfigurationPublishConfig(t *testing.T) { value := "Test Data" customGroup := "Custom Group" key := "myKey" - _, zk := initZkData(config_center.DEFAULT_GROUP, t) + ts, reg := initZkData(config_center.DEFAULT_GROUP, t) defer func() { + reg.client.Close() err := ts.Stop() assert.NoError(t, err) }() - err := zk.PublishConfig(key, customGroup, value) + err := reg.PublishConfig(key, customGroup, value) assert.Nil(t, err) - result, err := zk.GetInternalProperty("myKey", config_center.WithGroup(customGroup)) + result, err := reg.GetInternalProperty("myKey", config_center.WithGroup(customGroup)) assert.Nil(t, err) assert.Equal(t, value, result) var keys *gxset.HashSet - keys, err = zk.GetConfigKeysByGroup(customGroup) + keys, err = reg.GetConfigKeysByGroup(customGroup) assert.Nil(t, err) assert.Equal(t, 1, keys.Size()) assert.True(t, keys.Contains(key)) diff --git a/registry/zookeeper/listener.go b/registry/zookeeper/listener.go index 2c61a49705..515d79caa8 100644 --- a/registry/zookeeper/listener.go +++ b/registry/zookeeper/listener.go @@ -154,9 +154,6 @@ func (l *RegistryConfigurationListener) Next() (*registry.ServiceEvent, error) { logger.Warnf("update @result{%s}. But its connection to registry is invalid", e.Value) continue } - //r.update(e.res) - //write to invoker - //r.outerEventCh <- e.res return ®istry.ServiceEvent{Action: e.ConfigType, Service: e.Value.(*common.URL)}, nil } } diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go index a94dadf115..09cd47ed80 100644 --- a/registry/zookeeper/registry.go +++ b/registry/zookeeper/registry.go @@ -178,6 +178,7 @@ func (r *zkRegistry) DoUnsubscribe(conf *common.URL) (registry.Listener, error) // CloseAndNilClient closes listeners and clear client func (r *zkRegistry) CloseAndNilClient() { + r.client.Close() r.client = nil } diff --git a/remoting/zookeeper/client.go b/remoting/zookeeper/client.go index 7e55b3b38f..80d3073d22 100644 --- a/remoting/zookeeper/client.go +++ b/remoting/zookeeper/client.go @@ -47,18 +47,24 @@ var ( errNilChildren = perrors.Errorf("has none children") errNilNode = perrors.Errorf("node does not exist") ) + var ( - clientHaveCreated uint32 - mux sync.Mutex - zkClient *ZookeeperClient + zkClientPool ZookeeperClientPool + once sync.Once ) +type ZookeeperClientPool struct { + sync.Mutex + zkClient map[string]*ZookeeperClient +} + // ZookeeperClient represents zookeeper client Configuration type ZookeeperClient struct { name string ZkAddrs []string sync.RWMutex // for conn Conn *zk.Conn + activeNumber uint32 Timeout time.Duration Wait sync.WaitGroup valid uint32 @@ -147,20 +153,23 @@ func ValidateZookeeperClient(container ZkClientFacade, opts ...Option) error { return nil } +func initZookeeperClientPool() { + zkClientPool.zkClient = make(map[string]*ZookeeperClient) +} func getZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (*ZookeeperClient, error) { - var err error - if atomic.LoadUint32(&clientHaveCreated) == 0 { - mux.Lock() - defer mux.Unlock() - if atomic.LoadUint32(&clientHaveCreated) == 0 { - zkClient, err = NewZookeeperClient(name, zkAddrs, timeout) - if err == nil { - atomic.StoreUint32(&clientHaveCreated, 1) - } else { - return nil, err - } - } + once.Do(initZookeeperClientPool) + zkClientPool.Lock() + defer zkClientPool.Unlock() + if zkClient, ok := zkClientPool.zkClient[name]; ok { + zkClient.activeNumber++ + return zkClient, nil + } + zkClient, err := NewZookeeperClient(name, zkAddrs, timeout) + if err != nil { + return nil, err } + zkClientPool.zkClient[name] = zkClient + zkClient.activeNumber++ return zkClient, nil } @@ -176,6 +185,7 @@ func NewZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (* name: name, ZkAddrs: zkAddrs, Timeout: timeout, + activeNumber: 0, reconnectCh: make(chan struct{}), eventRegistry: make(map[string][]*chan struct{}), } @@ -234,6 +244,7 @@ func NewMockZookeeperClient(name string, timeout time.Duration, opts ...Option) return nil, nil, nil, perrors.WithMessagef(err, "zk.Connect") } atomic.StoreUint32(&z.valid, 1) + z.activeNumber++ return ts, z, event, nil } @@ -605,5 +616,11 @@ func (z *ZookeeperClient) Reconnect() <-chan struct{} { // In my opinion, this method should never called by user, here just for lint func (z *ZookeeperClient) Close() { - z.Conn.Close() + zkClientPool.Lock() + defer zkClientPool.Unlock() + z.activeNumber-- + if z.activeNumber == 0 { + z.Conn.Close() + delete(zkClientPool.zkClient, z.name) + } } diff --git a/remoting/zookeeper/client_test.go b/remoting/zookeeper/client_test.go index 4cff1340ec..ed90a155c9 100644 --- a/remoting/zookeeper/client_test.go +++ b/remoting/zookeeper/client_test.go @@ -18,6 +18,7 @@ package zookeeper import ( + "strconv" "testing" "time" ) @@ -78,6 +79,56 @@ func verifyEventStateOrder(t *testing.T, c <-chan zk.Event, expectedStates []zk. // //} +func Test_getZookeeperClient(t *testing.T) { + var err error + var tc *zk.TestCluster + var address []string + tc, err = zk.StartTestCluster(1, nil, nil) + assert.NoError(t, err) + assert.NotNil(t, tc.Servers[0]) + address = append(address, "127.0.0.1:"+strconv.Itoa(tc.Servers[0].Port)) + client1, err := getZookeeperClient("test1", address, 3*time.Second) + assert.Nil(t, err) + client2, err := getZookeeperClient("test1", address, 3*time.Second) + assert.Nil(t, err) + client3, err := getZookeeperClient("test2", address, 3*time.Second) + assert.Nil(t, err) + assert.Equal(t, client1, client2) + assert.NotEqual(t, client1, client3) + client1.Close() + client2.Close() + client3.Close() + tc.Stop() +} + +func Test_Close(t *testing.T) { + var err error + var tc *zk.TestCluster + var address []string + tc, err = zk.StartTestCluster(1, nil, nil) + assert.NoError(t, err) + assert.NotNil(t, tc.Servers[0]) + address = append(address, "127.0.0.1:"+strconv.Itoa(tc.Servers[0].Port)) + client1, err := getZookeeperClient("test1", address, 3*time.Second) + assert.Nil(t, err) + client2, err := getZookeeperClient("test1", address, 3*time.Second) + assert.Nil(t, err) + assert.Equal(t, client2, client1) + client1.Close() + client3, err := getZookeeperClient("test1", address, 3*time.Second) + assert.Nil(t, err) + assert.Equal(t, client3, client2) + client2.Close() + assert.Equal(t, client1.activeNumber, uint32(1)) + client1.Close() + assert.Equal(t, client1.activeNumber, uint32(0)) + client4, err := getZookeeperClient("test1", address, 3*time.Second) + assert.Nil(t, err) + assert.Equal(t, client4.activeNumber, uint32(1)) + assert.NotEqual(t, client3, client4) + tc.Stop() +} + func Test_newMockZookeeperClient(t *testing.T) { ts, _, event, err := NewMockZookeeperClient("test", 15*time.Second) assert.NoError(t, err) From 6fa3feaeaced5e4b667881e200f40cf8e73d9039 Mon Sep 17 00:00:00 2001 From: wangwx Date: Thu, 25 Feb 2021 21:15:25 +0800 Subject: [PATCH 19/35] fix facade ut --- registry/zookeeper/service_discovery.go | 1 + remoting/zookeeper/facade_test.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/registry/zookeeper/service_discovery.go b/registry/zookeeper/service_discovery.go index 6ac10f9b16..d053fe38d5 100644 --- a/registry/zookeeper/service_discovery.go +++ b/registry/zookeeper/service_discovery.go @@ -165,6 +165,7 @@ func (zksd *zookeeperServiceDiscovery) String() string { // Close client be closed func (zksd *zookeeperServiceDiscovery) Destroy() error { + zksd.client.Close() return nil } diff --git a/remoting/zookeeper/facade_test.go b/remoting/zookeeper/facade_test.go index 3fbecf79f4..e63cd4b143 100644 --- a/remoting/zookeeper/facade_test.go +++ b/remoting/zookeeper/facade_test.go @@ -100,4 +100,6 @@ func Test_Facade(t *testing.T) { go HandleClientRestart(mock) states := []zk.State{zk.StateConnecting, zk.StateConnected, zk.StateHasSession} verifyEventStateOrder(t, event, states, "event channel") + z.Close() + verifyEventStateOrder(t, event, []zk.State{zk.StateDisconnected}, "event channel") } From 93374a2eb1f418736bf9a83676543afc53c06cd3 Mon Sep 17 00:00:00 2001 From: wangwx Date: Thu, 25 Feb 2021 21:32:11 +0800 Subject: [PATCH 20/35] fix glint --- cluster/router/local/factory.go | 2 +- config_center/zookeeper/impl_test.go | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/cluster/router/local/factory.go b/cluster/router/local/factory.go index 73864c8dac..3724da733e 100644 --- a/cluster/router/local/factory.go +++ b/cluster/router/local/factory.go @@ -38,6 +38,6 @@ func newLocalPriorityRouteFactory() router.PriorityRouterFactory { } // NewPriorityRouter construct a new NewLocalDiscRouter via url -func (f *LocalPriorityRouteFactory) NewPriorityRouter(url *common.URL) (router.PriorityRouter, error) { +func (f *LocalPriorityRouteFactory) NewPriorityRouter(url *common.URL, ch chan struct{}) (router.PriorityRouter, error) { return NewLocalPriorityRouter(url) } diff --git a/config_center/zookeeper/impl_test.go b/config_center/zookeeper/impl_test.go index 01adb7bb51..7f17153e24 100644 --- a/config_center/zookeeper/impl_test.go +++ b/config_center/zookeeper/impl_test.go @@ -120,11 +120,6 @@ func TestGetConfig(t *testing.T) { assert.Equal(t, "", configs) } -func printMap(key, value interface{}) bool { - fmt.Println(key, value) - return true -} - func TestAddListener(t *testing.T) { ts, reg := initZkData("", t) defer func() { @@ -132,11 +127,9 @@ func TestAddListener(t *testing.T) { err := ts.Stop() assert.NoError(t, err) }() - reg.cacheListener.keyListeners.Range(printMap) listener := &mockDataListener{} reg.AddListener(dubboPropertyFileName, listener) - reg.cacheListener.keyListeners.Range(printMap) listener.wg.Add(1) data := ` dubbo.consumer.request_timeout=3s From cb8b665a9575d02eeb5ef4cea6ee1b7bb00978d0 Mon Sep 17 00:00:00 2001 From: wangwx Date: Fri, 26 Feb 2021 17:14:54 +0800 Subject: [PATCH 21/35] fix restart can't find provider error --- remoting/getty/getty_client.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/remoting/getty/getty_client.go b/remoting/getty/getty_client.go index 774f999e8a..e61cbde1ba 100644 --- a/remoting/getty/getty_client.go +++ b/remoting/getty/getty_client.go @@ -164,11 +164,9 @@ func (c *Client) Connect(url *common.URL) error { // close network connection func (c *Client) Close() { c.mux.Lock() - p := c.pool - c.pool = nil c.mux.Unlock() - if p != nil { - p.close() + if c.pool != nil { + c.pool.close() } } From 3fdbb015b00ad1546b27770351bc918ba1245a2d Mon Sep 17 00:00:00 2001 From: wangwx Date: Fri, 26 Feb 2021 23:58:04 +0800 Subject: [PATCH 22/35] try to fix provider lost --- protocol/dubbo/dubbo_invoker.go | 1 + remoting/getty/getty_client.go | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/protocol/dubbo/dubbo_invoker.go b/protocol/dubbo/dubbo_invoker.go index 231db381f9..16c22e3b30 100644 --- a/protocol/dubbo/dubbo_invoker.go +++ b/protocol/dubbo/dubbo_invoker.go @@ -195,6 +195,7 @@ func (di *DubboInvoker) Destroy() { di.quitOnce.Do(func() { di.BaseInvoker.Destroy() client := di.getClient() + exchangeClientMap.Delete(di.client) if client != nil { di.setClient(nil) client.Close() diff --git a/remoting/getty/getty_client.go b/remoting/getty/getty_client.go index e61cbde1ba..5029678df9 100644 --- a/remoting/getty/getty_client.go +++ b/remoting/getty/getty_client.go @@ -164,9 +164,11 @@ func (c *Client) Connect(url *common.URL) error { // close network connection func (c *Client) Close() { c.mux.Lock() + p := c.pool + c.pool = nil c.mux.Unlock() - if c.pool != nil { - c.pool.close() + if p != nil { + c.Close() } } From ef8966c96e21ad149ed02a86ebb3a0afb014fe20 Mon Sep 17 00:00:00 2001 From: wangwx Date: Sat, 27 Feb 2021 11:08:50 +0800 Subject: [PATCH 23/35] try to fix provider lost --- protocol/dubbo/dubbo_invoker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/dubbo/dubbo_invoker.go b/protocol/dubbo/dubbo_invoker.go index 16c22e3b30..0006b4e9fb 100644 --- a/protocol/dubbo/dubbo_invoker.go +++ b/protocol/dubbo/dubbo_invoker.go @@ -195,8 +195,8 @@ func (di *DubboInvoker) Destroy() { di.quitOnce.Do(func() { di.BaseInvoker.Destroy() client := di.getClient() - exchangeClientMap.Delete(di.client) if client != nil { + exchangeClientMap.Delete(di.GetUrl().Location) di.setClient(nil) client.Close() } From ca647ab9032ced69ed6ba20dfb361a59c0327729 Mon Sep 17 00:00:00 2001 From: wangwx Date: Sat, 27 Feb 2021 23:20:24 +0800 Subject: [PATCH 24/35] try to fix provider can't find error --- protocol/dubbo/dubbo_invoker.go | 7 +++++-- protocol/dubbo/dubbo_protocol.go | 4 +++- remoting/exchange_client.go | 21 ++++++++++++++++++++- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/protocol/dubbo/dubbo_invoker.go b/protocol/dubbo/dubbo_invoker.go index 0006b4e9fb..aed33a6338 100644 --- a/protocol/dubbo/dubbo_invoker.go +++ b/protocol/dubbo/dubbo_invoker.go @@ -196,9 +196,12 @@ func (di *DubboInvoker) Destroy() { di.BaseInvoker.Destroy() client := di.getClient() if client != nil { - exchangeClientMap.Delete(di.GetUrl().Location) + client.DecreaseActiveNumber() di.setClient(nil) - client.Close() + if client.GetActiveNumber() == 0 { + exchangeClientMap.Delete(di.GetUrl().Location) + client.Close() + } } }) } diff --git a/protocol/dubbo/dubbo_protocol.go b/protocol/dubbo/dubbo_protocol.go index 1f7cd50187..d6a71dc001 100644 --- a/protocol/dubbo/dubbo_protocol.go +++ b/protocol/dubbo/dubbo_protocol.go @@ -215,7 +215,9 @@ func getExchangeClient(url *common.URL) *remoting.ExchangeClient { if clientTmp == nil { return nil } - return clientTmp.(*remoting.ExchangeClient) + exchangeClient := clientTmp.(*remoting.ExchangeClient) + exchangeClient.IncreaseActiveNumber() + return exchangeClient } // rebuildCtx rebuild the context by attachment. diff --git a/remoting/exchange_client.go b/remoting/exchange_client.go index d65382035e..e13c89e25b 100644 --- a/remoting/exchange_client.go +++ b/remoting/exchange_client.go @@ -18,6 +18,7 @@ package remoting import ( "errors" + "sync/atomic" "time" ) @@ -51,6 +52,8 @@ type ExchangeClient struct { client Client // the tag for init. init bool + // the number of service using the exchangeClient + activeNum uint32 } // create ExchangeClient @@ -59,6 +62,7 @@ func NewExchangeClient(url *common.URL, client Client, connectTimeout time.Durat ConnectTimeout: connectTimeout, address: url.Location, client: client, + activeNum: 0, } client.SetExchangeClient(exchangeClient) if !lazyInit { @@ -66,7 +70,7 @@ func NewExchangeClient(url *common.URL, client Client, connectTimeout time.Durat return nil } } - + exchangeClient.IncreaseActiveNumber() return exchangeClient } @@ -87,6 +91,21 @@ func (cl *ExchangeClient) doInit(url *common.URL) error { return nil } +// increase number of service using client +func (client *ExchangeClient) IncreaseActiveNumber() { + atomic.AddUint32(&client.activeNum, 1) +} + +// decrease number of service using client +func (client *ExchangeClient) DecreaseActiveNumber() { + atomic.AddUint32(&client.activeNum, ^uint32(0)) +} + +// decrease number of service using client +func (client *ExchangeClient) GetActiveNumber() uint32 { + atomic.LoadUint32(&client.activeNum) +} + // two way request func (client *ExchangeClient) Request(invocation *protocol.Invocation, url *common.URL, timeout time.Duration, result *protocol.RPCResult) error { From 3a05f71acc412c12afb14ce2ba4c570e9c590eb2 Mon Sep 17 00:00:00 2001 From: wangwx Date: Sat, 27 Feb 2021 23:23:04 +0800 Subject: [PATCH 25/35] fix compile error --- remoting/exchange_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remoting/exchange_client.go b/remoting/exchange_client.go index e13c89e25b..0bd7a5a00f 100644 --- a/remoting/exchange_client.go +++ b/remoting/exchange_client.go @@ -103,7 +103,7 @@ func (client *ExchangeClient) DecreaseActiveNumber() { // decrease number of service using client func (client *ExchangeClient) GetActiveNumber() uint32 { - atomic.LoadUint32(&client.activeNum) + return atomic.LoadUint32(&client.activeNum) } // two way request From ae6a13829ab00c82a30742ca5dfa04f3e102efcd Mon Sep 17 00:00:00 2001 From: wangwx Date: Sat, 27 Feb 2021 23:54:13 +0800 Subject: [PATCH 26/35] change type error --- remoting/exchange_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remoting/exchange_client.go b/remoting/exchange_client.go index 0bd7a5a00f..e611586efc 100644 --- a/remoting/exchange_client.go +++ b/remoting/exchange_client.go @@ -101,7 +101,7 @@ func (client *ExchangeClient) DecreaseActiveNumber() { atomic.AddUint32(&client.activeNum, ^uint32(0)) } -// decrease number of service using client +// get number of service using client func (client *ExchangeClient) GetActiveNumber() uint32 { return atomic.LoadUint32(&client.activeNum) } From a8bc4e1bcd5d897c7072150c66ce16d0b7d15413 Mon Sep 17 00:00:00 2001 From: wangwx Date: Sun, 28 Feb 2021 12:24:24 +0800 Subject: [PATCH 27/35] fix comments --- protocol/dubbo/dubbo_invoker.go | 4 ++-- remoting/exchange_client.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/protocol/dubbo/dubbo_invoker.go b/protocol/dubbo/dubbo_invoker.go index aed33a6338..bc85d73032 100644 --- a/protocol/dubbo/dubbo_invoker.go +++ b/protocol/dubbo/dubbo_invoker.go @@ -196,9 +196,9 @@ func (di *DubboInvoker) Destroy() { di.BaseInvoker.Destroy() client := di.getClient() if client != nil { - client.DecreaseActiveNumber() + activeNumber := client.DecreaseActiveNumber() di.setClient(nil) - if client.GetActiveNumber() == 0 { + if activeNumber == 0 { exchangeClientMap.Delete(di.GetUrl().Location) client.Close() } diff --git a/remoting/exchange_client.go b/remoting/exchange_client.go index e611586efc..6d57a1471e 100644 --- a/remoting/exchange_client.go +++ b/remoting/exchange_client.go @@ -92,13 +92,13 @@ func (cl *ExchangeClient) doInit(url *common.URL) error { } // increase number of service using client -func (client *ExchangeClient) IncreaseActiveNumber() { - atomic.AddUint32(&client.activeNum, 1) +func (client *ExchangeClient) IncreaseActiveNumber() uint32 { + return atomic.AddUint32(&client.activeNum, 1) } // decrease number of service using client -func (client *ExchangeClient) DecreaseActiveNumber() { - atomic.AddUint32(&client.activeNum, ^uint32(0)) +func (client *ExchangeClient) DecreaseActiveNumber() uint32 { + return atomic.AddUint32(&client.activeNum, ^uint32(0)) } // get number of service using client From 972a91ae3a8ee863d03b728309092d4babf51d18 Mon Sep 17 00:00:00 2001 From: wangwx Date: Tue, 2 Mar 2021 20:32:28 +0800 Subject: [PATCH 28/35] move zk to gost --- cluster/router/chain/chain_test.go | 12 +- cluster/router/condition/app_router_test.go | 8 +- cluster/router/tag/tag_router_test.go | 5 +- config_center/zookeeper/impl.go | 9 +- go.mod | 16 +- go.sum | 328 ++++++++++ metadata/report/zookeeper/report.go | 11 +- registry/zookeeper/listener.go | 6 +- registry/zookeeper/registry.go | 15 +- registry/zookeeper/registry_test.go | 6 +- registry/zookeeper/service_discovery.go | 9 +- remoting/exchange_client.go | 13 +- remoting/zookeeper/client.go | 560 +----------------- remoting/zookeeper/client_test.go | 215 ------- .../curator_discovery/service_discovery.go | 5 +- remoting/zookeeper/facade.go | 8 +- remoting/zookeeper/facade_test.go | 30 +- remoting/zookeeper/listener.go | 13 +- remoting/zookeeper/listener_test.go | 12 +- 19 files changed, 435 insertions(+), 846 deletions(-) delete mode 100644 remoting/zookeeper/client_test.go diff --git a/cluster/router/chain/chain_test.go b/cluster/router/chain/chain_test.go index 938b06b469..d38b3be994 100644 --- a/cluster/router/chain/chain_test.go +++ b/cluster/router/chain/chain_test.go @@ -26,6 +26,7 @@ import ( import ( zk "github.com/dubbogo/go-zookeeper/zk" + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" "github.com/stretchr/testify/assert" ) @@ -39,7 +40,6 @@ import ( _ "github.com/apache/dubbo-go/config_center/zookeeper" "github.com/apache/dubbo-go/protocol" "github.com/apache/dubbo-go/protocol/invocation" - "github.com/apache/dubbo-go/remoting/zookeeper" ) const ( @@ -64,7 +64,7 @@ const ( var zkCluster *zk.TestCluster func TestNewRouterChain(t *testing.T) { - ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second) + ts, z, _, err := gxzookeeper.NewMockZookeeperClient("test", 15*time.Second) assert.NoError(t, err) zkCluster = ts err = z.Create(path) @@ -118,7 +118,7 @@ func TestNewRouterChainURLNil(t *testing.T) { } func TestRouterChainAddRouters(t *testing.T) { - _, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second, zookeeper.WithTestCluster(zkCluster)) + _, z, _, err := gxzookeeper.NewMockZookeeperClient("test", 15*time.Second, gxzookeeper.WithTestCluster(zkCluster)) assert.NoError(t, err) err = z.Create(path) assert.NoError(t, err) @@ -167,7 +167,7 @@ conditions: } func TestRouterChainRoute(t *testing.T) { - ts, _, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second, zookeeper.WithTestCluster(zkCluster)) + ts, _, _, err := gxzookeeper.NewMockZookeeperClient("test", 15*time.Second, gxzookeeper.WithTestCluster(zkCluster)) assert.Nil(t, err) zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, ts.Servers[0].Port)) configuration, err := extension.GetConfigCenterFactory(zkName).GetDynamicConfiguration(zkUrl) @@ -195,7 +195,7 @@ func TestRouterChainRoute(t *testing.T) { } func TestRouterChainRouteAppRouter(t *testing.T) { - ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second, zookeeper.WithTestCluster(zkCluster)) + ts, z, _, err := gxzookeeper.NewMockZookeeperClient("test", 15*time.Second, gxzookeeper.WithTestCluster(zkCluster)) assert.NoError(t, err) err = z.Create(path) assert.NoError(t, err) @@ -239,7 +239,7 @@ conditions: } func TestRouterChainRouteNoRoute(t *testing.T) { - ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second, zookeeper.WithTestCluster(zkCluster)) + ts, z, _, err := gxzookeeper.NewMockZookeeperClient("test", 15*time.Second, gxzookeeper.WithTestCluster(zkCluster)) assert.Nil(t, err) defer func() { _ = ts.Stop() diff --git a/cluster/router/condition/app_router_test.go b/cluster/router/condition/app_router_test.go index 6dcfefc3d3..86fdedea1f 100644 --- a/cluster/router/condition/app_router_test.go +++ b/cluster/router/condition/app_router_test.go @@ -24,6 +24,7 @@ import ( ) import ( + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" "github.com/stretchr/testify/assert" ) @@ -35,7 +36,6 @@ import ( "github.com/apache/dubbo-go/config_center" _ "github.com/apache/dubbo-go/config_center/zookeeper" "github.com/apache/dubbo-go/remoting" - "github.com/apache/dubbo-go/remoting/zookeeper" ) const ( @@ -60,7 +60,7 @@ runtime: false conditions: - => host != 172.22.3.91 ` - ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second) + ts, z, _, err := gxzookeeper.NewMockZookeeperClient("test", 15*time.Second) assert.NoError(t, err) err = z.Create(routerPath) assert.NoError(t, err) @@ -115,7 +115,7 @@ conditions: - => host != 172.22.3.91 - host = 192.168.199.208 => host = 192.168.199.208 ` - ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second) + ts, z, _, err := gxzookeeper.NewMockZookeeperClient("test", 15*time.Second) assert.NoError(t, err) err = z.Create(routerPath) assert.NoError(t, err) @@ -161,7 +161,7 @@ runtime: false conditions: - => host != 172.22.3.91 ` - ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second) + ts, z, _, err := gxzookeeper.NewMockZookeeperClient("test", 15*time.Second) assert.NoError(t, err) err = z.Create(routerPath) assert.NoError(t, err) diff --git a/cluster/router/tag/tag_router_test.go b/cluster/router/tag/tag_router_test.go index 9ef1661c21..984f9dd62d 100644 --- a/cluster/router/tag/tag_router_test.go +++ b/cluster/router/tag/tag_router_test.go @@ -27,6 +27,7 @@ import ( import ( "github.com/RoaringBitmap/roaring" "github.com/dubbogo/go-zookeeper/zk" + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) @@ -260,7 +261,7 @@ type DynamicTagRouter struct { //rule *RouterRule route *tagRouter - zkClient *zookeeper.ZookeeperClient + zkClient *gxzookeeper.ZookeeperClient testCluster *zk.TestCluster invokers []protocol.Invoker url *common.URL @@ -299,7 +300,7 @@ tags: - name: tag3 addresses: ["127.0.0.1:20003", "127.0.0.1:20004"] ` - ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second) + ts, z, _, err := gxzookeeper.NewMockZookeeperClient("test", 15*time.Second) suite.NoError(err) err = z.Create(routerPath) suite.NoError(err) diff --git a/config_center/zookeeper/impl.go b/config_center/zookeeper/impl.go index ba1ce213f5..e24e63fd03 100644 --- a/config_center/zookeeper/impl.go +++ b/config_center/zookeeper/impl.go @@ -24,6 +24,7 @@ import ( import ( gxset "github.com/dubbogo/gost/container/set" + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" perrors "github.com/pkg/errors" ) @@ -50,7 +51,7 @@ type zookeeperDynamicConfiguration struct { wg sync.WaitGroup cltLock sync.Mutex done chan struct{} - client *zookeeper.ZookeeperClient + client *gxzookeeper.ZookeeperClient //listenerLock sync.Mutex listener *zookeeper.ZkEventListener @@ -63,7 +64,7 @@ func newZookeeperDynamicConfiguration(url *common.URL) (*zookeeperDynamicConfigu url: url, rootPath: "/" + url.GetParam(constant.CONFIG_NAMESPACE_KEY, config_center.DEFAULT_GROUP) + "/config", } - err := zookeeper.ValidateZookeeperClient(c, zookeeper.WithZkName(ZkClient)) + err := zookeeper.ValidateZookeeperClient(c, ZkClient) if err != nil { logger.Errorf("zookeeper client start error ,error message is %v", err) return nil, err @@ -163,11 +164,11 @@ func (c *zookeeperDynamicConfiguration) SetParser(p parser.ConfigurationParser) c.parser = p } -func (c *zookeeperDynamicConfiguration) ZkClient() *zookeeper.ZookeeperClient { +func (c *zookeeperDynamicConfiguration) ZkClient() *gxzookeeper.ZookeeperClient { return c.client } -func (c *zookeeperDynamicConfiguration) SetZkClient(client *zookeeper.ZookeeperClient) { +func (c *zookeeperDynamicConfiguration) SetZkClient(client *gxzookeeper.ZookeeperClient) { c.client = client } diff --git a/go.mod b/go.mod index bb456a7ec1..9f2022d7ab 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/apache/dubbo-go go 1.13 require ( - github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/RoaringBitmap/roaring v0.5.5 github.com/Workiva/go-datastructures v1.0.52 github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 @@ -14,9 +13,7 @@ require ( github.com/creasty/defaults v1.5.1 github.com/dubbogo/go-zookeeper v1.0.2 github.com/dubbogo/gost v1.11.0 - github.com/elazarl/go-bindata-assetfs v1.0.0 // indirect github.com/emicklei/go-restful/v3 v3.4.0 - github.com/frankban/quicktest v1.4.1 // indirect github.com/fsnotify/fsnotify v1.4.9 github.com/go-co-op/gocron v0.1.1 github.com/go-resty/resty/v2 v2.3.0 @@ -25,35 +22,34 @@ require ( github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 github.com/hashicorp/consul v1.8.0 github.com/hashicorp/consul/api v1.5.0 - github.com/hashicorp/go-raftchunking v0.6.3-0.20191002164813-7e9e8525653a // indirect - github.com/hashicorp/vault/api v1.0.5-0.20191108163347-bdd38fca2cff // indirect github.com/hashicorp/vault/sdk v0.1.14-0.20191112033314-390e96e22eb2 github.com/jinzhu/copier v0.0.0-20190625015134-976e0346caa8 + github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect github.com/magiconair/properties v1.8.4 github.com/mitchellh/mapstructure v1.4.1 github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd github.com/nacos-group/nacos-sdk-go v1.0.6 github.com/opentracing/opentracing-go v1.2.0 - github.com/pierrec/lz4 v2.2.6+incompatible // indirect github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.8.0 + github.com/prometheus/client_golang v1.9.0 github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b - github.com/stretchr/objx v0.2.0 // indirect github.com/stretchr/testify v1.7.0 github.com/zouyx/agollo/v3 v3.4.5 go.uber.org/atomic v1.7.0 go.uber.org/zap v1.16.0 golang.org/x/sys v0.0.0-20201223074533-0d417f636930 // indirect - google.golang.org/grpc v1.26.0 + google.golang.org/grpc v1.33.1 + google.golang.org/grpc/examples v0.0.0-20210301210255-fc8f38cccf75 // indirect gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.16.9 k8s.io/apimachinery v0.16.9 k8s.io/client-go v0.16.9 - k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a // indirect ) replace ( github.com/coreos/bbolt => go.etcd.io/bbolt v1.3.4 + github.com/dubbogo/gost => github.com/wenxuwan/gost v1.9.4-0.20210302082346-4f0dc3bef61f github.com/envoyproxy/go-control-plane => github.com/envoyproxy/go-control-plane v0.8.0 github.com/shirou/gopsutil => github.com/shirou/gopsutil v0.0.0-20181107111621-48177ef5f880 + go.etcd.io/bbolt v1.3.4 => github.com/coreos/bbolt v1.3.3 ) diff --git a/go.sum b/go.sum index aee0ed6986..b2efef1948 100644 --- a/go.sum +++ b/go.sum @@ -6,25 +6,36 @@ cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxK cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0 h1:0E3eE8MX426vUOs7aHfI7aN1BrIzzzf4ccKCSfSjGmc= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v32.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v40.3.0+incompatible h1:NthZg3psrLxvQLN6rVm07pZ9mv2wvGNaBNGQ3fnPvLE= github.com/Azure/azure-sdk-for-go v40.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest/autorest v0.1.0/go.mod h1:AKyIcETwSUFxIcs/Wnq/C+kwCtlEYGUVd7FPNb2slmg= +github.com/Azure/go-autorest/autorest v0.5.0/go.mod h1:9HLKlQjVBH6U3oDfsXOeVc56THsLPw1L03yban4xThw= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= github.com/Azure/go-autorest/autorest v0.10.0 h1:mvdtztBqcL8se7MdrUweNieTNi4kfNG6GOJuurQJpuY= github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest/adal v0.1.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= +github.com/Azure/go-autorest/autorest/adal v0.2.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0= github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/azure/auth v0.1.0/go.mod h1:Gf7/i2FUpyb/sGBLIFxTBzrNzBo7aPXXE3ZVeDRwdpM= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 h1:iM6UAvjR97ZIeR93qTcwpKNMpV+/FTWjwEbuPD495Tk= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= +github.com/Azure/go-autorest/autorest/azure/cli v0.1.0/go.mod h1:Dk8CUAt/b/PzkfeRsWzVG9Yj3ps8mS8ECztu43rdU8U= github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 h1:LXl088ZQlP0SBppGFsRZonW6hSvwgL5gRByMbvUbx8U= github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= @@ -34,12 +45,15 @@ github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc= github.com/Azure/go-autorest/autorest/to v0.3.0 h1:zebkZaadz7+wIQYgC7GXaz3Wb28yKYfVkkBKwc38VF8= github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= +github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8= github.com/Azure/go-autorest/autorest/validation v0.2.0 h1:15vMO4y76dehZSq7pAaOLQxC6dZYsSrj2GQpflyM/L4= github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88= github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= @@ -51,11 +65,15 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.4.3 h1:M3NHMuPgMSUPdE5epwNUHlRPSVzHs8HpRTrVXhR0myo= github.com/Microsoft/go-winio v0.4.3/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 h1:ygIc8M6trr62pF5DucadTWGdEB4mEyvzi0e2nbcmcyA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= +github.com/Microsoft/hcsshim v0.8.7-0.20191101173118-65519b62243c/go.mod h1:7xhjOwRV2+0HXGmM0jxaEu+ZiXJFoVZOTfL/dmqbrD8= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.0.1/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:iGLljf5n9GjT6kc0HBvyI1nOKnGQbNB66VzSNbK5iks= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/RoaringBitmap/roaring v0.5.5 h1:naNqvO1mNnghk2UvcsqnzHDBn9DRbCIRy94GmDTRVTQ= @@ -72,17 +90,28 @@ github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af h1:DBNMBMuMiWYu0b+8KM github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJMsVxt52+i0Ha45fjshj6wxYr1r19tB9bw= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.0/go.mod h1:zpDJeKyp9ScW4NNrbdr+Eyxvry3ilGPewKoXw3XGN1k= +github.com/alangpierce/go-forceexport v0.0.0-20160317203124-8f1d6941cd75/go.mod h1:uAXEEpARkRhCZfEvy/y0Jcc888f9tHCc1W7/UeEtreE= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alibaba/sentinel-golang v0.6.2/go.mod h1:5jemKdyCQCKVf+quEia53fo9a17OSe+wnl9HX2NbNpc= github.com/alibaba/sentinel-golang v1.0.2 h1:Acopq74hOtZN4MV1v811MQ6QcqPFLDSczTrRXv9zpIg= github.com/alibaba/sentinel-golang v1.0.2/go.mod h1:QsB99f/z35D2AiMrAWwgWE85kDTkBUIkcmPrRt+61NI= +github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190808125512-07798873deee/go.mod h1:myCDvQSzCW+wB1WAlocEru4wMGJxy+vlxHdhegi1CDQ= github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 h1:zOVTBdCKFd9JbCKz9/nt+FovbjPFmb7mUnp8nH9fQBA= github.com/aliyun/alibaba-cloud-sdk-go v1.61.18/go.mod h1:v8ESoHo4SyHmuB4b1tJqDHxfTGEciD+yhvOU/5s1Rfk= +github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/dubbo-getty v1.3.10/go.mod h1:x6rraK01BL5C7jUM2fPl5KMkAxLVIx54ZB8/XEOik9Y= github.com/apache/dubbo-getty v1.4.3 h1:PCKpryDasKOxwT5MBC6MIMO+0NLOaHF6Xco9YXQw7HI= github.com/apache/dubbo-getty v1.4.3/go.mod h1:ansXgKxxyhCOiQL29nO5ce1MDcEKmCyZuNR9oMs3hek= +github.com/apache/dubbo-go v1.5.5/go.mod h1:KAty5L/vcHjh3qcTfC4R5Nfd0tkk7MLJnux/IQKfQLg= +github.com/apache/dubbo-go-hessian2 v1.7.0/go.mod h1:7rEw9guWABQa6Aqb8HeZcsYPHsOS7XT1qtJvkmI6c5w= github.com/apache/dubbo-go-hessian2 v1.8.2 h1:CQq2Mmlrk6Fqmudwl9Dqps8drTrBFnmXRlzgOjj0FqA= github.com/apache/dubbo-go-hessian2 v1.8.2/go.mod h1:xQUjE7F8PX49nm80kChFvepA/AvqAZ0oh/UaB6+6pBE= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -97,42 +126,67 @@ github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.23.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.41/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0 h1:0xphMHGMLBrPMfxR2AmVjZKcMEESEgWF8Kru94BNByk= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23 h1:D21IyuvjDCshj1/qq+pCNd3VZOAEI9jy6Bi131YlXgI= github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= +github.com/bwmarrin/discordgo v0.20.2/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= +github.com/caddyserver/certmagic v0.10.6/go.mod h1:Y8jcUBctgk/IhpAzlHKfimZNyXCkfGgRTC0orl8gROQ= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.0.0/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= +github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyYMm1aztcyj/J5ckgJm2zwdDajFbx1NY= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/cloudflare-go v0.10.2/go.mod h1:qhVI5MKwBGhdNU89ZRz2plgYutcJ5PCekLxXn56w6SY= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/coredns/coredns v1.1.2 h1:bAFHrSsBeTeRG5W3Nf2su3lUGw7Npw2UKeCJm/3A638= github.com/coredns/coredns v1.1.2/go.mod h1:zASH/MVDgR6XZTbxvOnsZfffS+31vg6Ackf/wo1+AM0= +github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY= +github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.18+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.25+incompatible h1:0GQEw6h3YnuOVdtwygkIfJ+Omx0tZ8/QkVyXI4LkbeY= github.com/coreos/etcd v3.3.25+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= @@ -144,12 +198,18 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= +github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpu/goacmedns v0.0.1/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMElOWxok= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creasty/defaults v1.5.1 h1:j8WexcS3d/t4ZmllX4GEkl4wIB/trOr035ajcLHCISM= github.com/creasty/defaults v1.5.1/go.mod h1:FPZ+Y0WNrbqOVw+c6av63eyHUAl6pMHZwqLPvXUZGfY= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -166,10 +226,17 @@ github.com/digitalocean/godo v1.10.0 h1:uW1/FcvZE/hoixnJcnlmIUvTVNdZCLjRLzmDtRi1 github.com/digitalocean/godo v1.10.0/go.mod h1:h6faOIcZ8lWIwNQ+DN7b3CgX4Kwby5T+nbpNqkUIozU= github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= +github.com/dnaeon/go-vcr v0.0.0-20180814043457-aafff18a5cc2/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/dnsimple/dnsimple-go v0.30.0/go.mod h1:O5TJ0/U6r7AfT8niYNlmohpLbCSG+c71tQlGr9SeGrg= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v1.4.2-0.20191101170500-ac7306503d23/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.3.0 h1:3lOnM9cSzgGwx8VfK/NGOW5fLQ0GjIlCkaktF+n1M6o= github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= 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= @@ -185,6 +252,7 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/ef-ds/deque v1.0.4-0.20190904040645-54cb57c252a1/go.mod h1:HvODWzv6Y6kBf3Ah2WzN1bHjDUezGLaAhwuWVwfpEJs= github.com/elazarl/go-bindata-assetfs v0.0.0-20160803192304-e1a2a7ec64b0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk= github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= @@ -193,6 +261,7 @@ github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633 h1:H2pdYOb3KQ1 github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.4.0 h1:IIDhql3oyWZj1ay2xBZGb4sTOWMad0HVW8rwhVxN/Yk= github.com/emicklei/go-restful/v3 v3.4.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.8.0 h1:uE6Fp4fOcAJdc1wTQXLJ+SYistkbG1dNoi6Zs1+Ybvk= github.com/envoyproxy/go-control-plane v0.8.0/go.mod h1:GSSbY9P1neVhdY7G4wu+IK1rk/dqhiCC/4ExuWJZVuk= github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -200,12 +269,16 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrp github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible h1:fUDGZCv/7iAN7u0puUVhvKCcsR6vRfwrJatElLBEf0I= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.0.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/exoscale/egoscale v0.18.1/go.mod h1:Z7OOdzzTOz1Q1PjQXumlz9Wn/CddH0zSYdCF3rnBKXE= github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 h1:Ghm4eQYC0nEPnSJdVkTrXpu9KtoVCSo1hg7mtI7G9KU= github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239/go.mod h1:Gdwt2ce0yfBxPvZrHkprdPPTTS3N5rwmLE8T22KBXlw= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/forestgiant/sliceutil v0.0.0-20160425183142-94783f95db6c/go.mod h1:pFdJbAhRf7rh6YYMUdIQGyzne6zYL1tCUW8QV2B3UfY= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.4.1 h1:Wv2VwvNn73pAdFIVUQRXYDFp31lXKbqblIXo/Q5GPSg= @@ -213,18 +286,31 @@ github.com/frankban/quicktest v1.4.1/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsouza/go-dockerclient v1.6.0/go.mod h1:YWwtNPuL4XTX1SKJQk86cWPmmqwx+4np9qfPbb+znGc= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= +github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 h1:Ujru1hufTHVb++eG6OuNDKMxZnGIvF6o/u8q/8h2+I4= github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31 h1:gclg6gY70GLy3PbkQ1AERPfmLMMagS60DKF78eWwLn8= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/go-acme/lego/v3 v3.4.0/go.mod h1:xYbLDuxq3Hy4bMUT1t9JIuz6GWIWb3m5X+TeTHYaT7M= github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= +github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= github.com/go-co-op/gocron v0.1.1 h1:OfDmkqkCguFtFMsm6Eaayci3DADLa8pXvdmOlPU/JcU= github.com/go-co-op/gocron v0.1.1/go.mod h1:Y9PWlYqDChf2Nbgg7kfS+ZsXHDTZbMZYPEQ0MILqH+M= github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-git-fixtures/v4 v4.0.1/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= +github.com/go-git/go-git/v5 v5.1.0/go.mod h1:ZKfuPUoY1ZqIG4QG9BDBh3G4gLM5zvPuSJAozQrZuyM= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= @@ -241,14 +327,22 @@ github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+ github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= +github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= github.com/go-redis/redis v6.15.5+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-resty/resty/v2 v2.3.0 h1:JOOeAvjSlapTT92p8xiS19Zxev1neGikoHsXJeOq8So= github.com/go-resty/resty/v2 v2.3.0/go.mod h1:UpN9CgLZNsv4e9XG50UU8xdI0F43UQ4HmxLBDwaroHU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible/go.mod h1:qf9acutJ8cwBUhm1bqgz6Bei9/C/c93FPDljKWwsOgM= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw= github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.3/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0 h1:kFkMAZBNAn4j7K0GiZr8cRYzejq68VbheufiV3YuyFI= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -256,6 +350,9 @@ github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -263,6 +360,8 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -270,13 +369,17 @@ github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= @@ -291,6 +394,8 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= @@ -306,6 +411,9 @@ github.com/google/tcpproxy v0.0.0-20180808230851-dfa16c61dad2/go.mod h1:DavVbd41 github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= @@ -314,37 +422,52 @@ github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhp github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gophercloud/gophercloud v0.3.0 h1:6sjpKIpVwRIIwmcEGp+WwNovNsem+c+2vm6oxshRpL8= +github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99 h1:twflg0XRTjwKpxb/jFExr4HGq6on2dEOmnL6FV+fgPw= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 h1:FlFbCRLd5Jr4iYXZufAvgWN6Ao0JrI5chLINnUXDDr0= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= github.com/hashicorp/consul v1.8.0 h1:yRKMKZyPLqUxl37t4nFt5OuGmTXoFhTJrakhfnYKCYA= github.com/hashicorp/consul v1.8.0/go.mod h1:Gg9/UgAQ9rdY3CTvzQZ6g2jcIb7NlIfjI+0pvLk5D1A= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/api v1.4.0/go.mod h1:xc8u05kyMa3Wjr9eEAsIAo3dg8+LywT5E/Cl7cNS5nU= github.com/hashicorp/consul/api v1.5.0 h1:Yo2bneoGy68A7aNwmuETFnPhjyBEm7n3vzRacEVMjvI= github.com/hashicorp/consul/api v1.5.0/go.mod h1:LqwrLNW876eYSuUOo4ZLHBcdKc038txr/IMfbLPATa4= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.4.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= github.com/hashicorp/consul/sdk v0.5.0 h1:WC4594Wp/LkEeML/OdQKEC1yqBmEYkRp6i7X5u0zDAs= github.com/hashicorp/consul/sdk v0.5.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-bexpr v0.1.2 h1:ijMXI4qERbzxbCnkxmfUtwMyjrrk3y+Vt0MxojNCbBs= @@ -371,6 +494,7 @@ github.com/hashicorp/go-memdb v1.0.3/go.mod h1:LWQ8R70vPrS4OEY9k28D2z8/Zzyu34NVz github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= @@ -403,6 +527,8 @@ github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= +github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hil v0.0.0-20160711231837-1e86c6b523c5 h1:uk280DXEbQiCOZgCOI3elFSeNxf8YIZiNsbr2pQLYD0= @@ -442,23 +568,30 @@ github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKe github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhKWFeDesPjMj+wCHReeknARU3wqlyN4= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= +github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= github.com/jackc/pgx v3.3.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= github.com/jarcoal/httpmock v0.0.0-20180424175123-9c70cfe4a1da h1:FjHUJJ7oBW4G/9j1KzlHaXL09LyMVM9rupS39lncbXk= github.com/jarcoal/httpmock v0.0.0-20180424175123-9c70cfe4a1da/go.mod h1:ks+b9deReOc7jgqp+e7LuFiCBH6Rm5hL32cLcEAArb4= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 h1:IPJ3dvxmJ4uczJe5YQdrYB16oTJlGSC/OyZDqUk9xX4= github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869/go.mod h1:cJ6Cj7dQo+O6GJNiMx+Pa94qKj+TG8ONdKHgMNIyyag= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/copier v0.0.0-20190625015134-976e0346caa8 h1:mGIXW/lubQ4B+3bXTLxcTMTjUNDqoF6T/HUW9LbFx9s= github.com/jinzhu/copier v0.0.0-20190625015134-976e0346caa8/go.mod h1:yL958EeXv8Ylng6IfnvG4oflryUi3vgA3xPs9hmII1s= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/joyent/triton-go v0.0.0-20180628001255-830d2b111e62/go.mod h1:U+RSyWxWd04xTqnuOQxnai7XGS2PrPY2cfGoDKtMHjA= github.com/joyent/triton-go v1.7.1-0.20200416154420-6801d15b779f h1:ENpDacvnr8faw5ugQmEF1QYk+f/Y9lXFvuYmRxykago= github.com/joyent/triton-go v1.7.1-0.20200416154420-6801d15b779f/go.mod h1:KDSfL7qe5ZfQqvlDMkVjCztbmcpp/c8M77vhQP8ZPvk= @@ -468,6 +601,7 @@ github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -479,9 +613,13 @@ github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQ github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/k0kubun/pp v3.0.1+incompatible h1:3tqvf7QgUnZ5tXO6pNAZlrvHgl6DvifjDrd9g2S9Z40= github.com/k0kubun/pp v3.0.1+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3tgzSScAn6HmfYukg= +github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/kolo/xmlrpc v0.0.0-20190717152603-07c4ee3fd181/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= @@ -493,6 +631,13 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA= +github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w= +github.com/labstack/echo/v4 v4.1.15/go.mod h1:GWO5IBVzI371K8XJe50CSvHjQCafK6cw8R/moLhEU6o= +github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/lestrrat/go-envload v0.0.0-20180220120943-6ed08b54a570 h1:0iQektZGS248WXmGIYOwRXSQhD4qn3icjMpuxwO7qlo= github.com/lestrrat/go-envload v0.0.0-20180220120943-6ed08b54a570/go.mod h1:BLt8L9ld7wVsvEWQbuLrUZnCMnUmLZ+CGDzKtclrTlE= github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f h1:sgUSP4zdTUZYZgAGGtN5Lxk92rK+JUFOwf+FT99EEI4= @@ -500,35 +645,53 @@ github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f/go.mod github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042 h1:Bvq8AziQ5jFF4BHGAEDSqwPW1NJS3XshxbRCxtjFAZc= github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042/go.mod h1:TPpsiPUEh0zFL1Snz4crhMlBe60PYxRHr5oFF3rRYg0= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linode/linodego v0.7.1 h1:4WZmMpSA2NRwlPZcc0+4Gyn7rr99Evk9bnr0B3gXRKE= github.com/linode/linodego v0.7.1/go.mod h1:ga11n3ivecUrPCHN0rANxKmfWBJVkOXfLMZinAbj2sY= +github.com/linode/linodego v0.10.0 h1:AMdb82HVgY8o3mjBXJcUv9B+fnJjfDMn2rNRGbX+jvM= +github.com/linode/linodego v0.10.0/go.mod h1:cziNP7pbvE3mXIPneHj0oRY8L1WtGEIKlZ8LANE4eXA= +github.com/liquidweb/liquidweb-go v1.6.0/go.mod h1:UDcVnAMDkZxpw4Y7NOHkqoeiGacVLEIG/i5J9cyixzQ= +github.com/lucas-clemente/quic-go v0.14.1/go.mod h1:Vn3/Fb0/77b02SGhQk36KzOUmXgVpFfizUfW5WMaqyU= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/marten-seemann/chacha20 v0.2.0/go.mod h1:HSdjFau7GzYRj+ahFNwsO3ouVJr1HFkWoEwNDb4TMtE= +github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI= +github.com/marten-seemann/qtls v0.4.1/go.mod h1:pxVXcHHw1pNIt8Qo0pwSYQEoZ8yYOOPXTCZLQQunvRc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/micro/cli/v2 v2.1.2/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOtGtYg= +github.com/micro/go-micro/v2 v2.9.1/go.mod h1:x55ZM3Puy0FyvvkR3e0ha0xsE9DFwfPSUMWAIbFY0SY= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26 h1:gPxPSwALAeHJSjarOs00QjVdV9QoBvc1D2ujQUr5BzU= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.27 h1:aEH/kqUzUxGJ/UHcEKdJY+ugH6WEzsEBBSPa8zuy1aM= +github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0 h1:tEElEatulEHDeedTxwckzyYMA5c86fbmNIUL1hBIiTg= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= @@ -541,14 +704,18 @@ github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go. github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.0 h1:/x0XQ6h+3U3nAyk1yx+bHPURrKa9sVVvYbuqZ7pIAtI= github.com/mitchellh/go-testing-interface v1.14.0/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed/go.mod h1:3rdaFaCv4AyBgu5ALFM0+tSuHrBh6v692nyQe3ikrq0= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452 h1:hOY53G+kBFhbYFpRVxHl5eS7laP6B1+Cq+Z9Dry1iMU= github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= +github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y= +github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.0.0 h1:ATSdz4NWrmWPOF1CeCBU4sMCno2hgqdbSrRPFWQSVZI= @@ -563,28 +730,44 @@ github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lN github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae h1:VeRdUYdCw49yizlSbMEn2SZ+gT+3IUKx8BqxyQdz+BY= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nacos-group/nacos-sdk-go v1.0.0/go.mod h1:hlAPn3UdzlxIlSILAyOXKxjFSvDJ9oLzTJ9hLAK1KzA= +github.com/nacos-group/nacos-sdk-go v1.0.1/go.mod h1:hlAPn3UdzlxIlSILAyOXKxjFSvDJ9oLzTJ9hLAK1KzA= github.com/nacos-group/nacos-sdk-go v1.0.6 h1:0OqjS37qIKKKZKRQSJ5pNFGRrfzP7+gD4L6dvOkPFZw= github.com/nacos-group/nacos-sdk-go v1.0.6/go.mod h1:hlAPn3UdzlxIlSILAyOXKxjFSvDJ9oLzTJ9hLAK1KzA= +github.com/namedotcom/go v0.0.0-20180403034216-08470befbe04/go.mod h1:5sN+Lt1CaY4wsPvgQH/jsuJi4XO2ssZbdsIizr4CVC8= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats-server/v2 v2.1.6/go.mod h1:BL1NOtaBQ5/y97djERRVWNouMW7GT3gxnmbE/eC8u8A= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nats.go v1.9.2/go.mod h1:AjGArbfyR50+afOUotNX2Xs5SYHf+CoOa5HH1eEl2HE= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.4/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= github.com/nicolai86/scaleway-sdk v1.10.2-0.20180628010248-798f60e20bb2 h1:BQ1HW7hr4IVovMwWg0E0PYcyW8CzqDcVmaew9cujU4s= github.com/nicolai86/scaleway-sdk v1.10.2-0.20180628010248-798f60e20bb2/go.mod h1:TLb2Sg7HQcgGdloNxkrmtgDNR9uVYF3lfdFIN4Ro6Sk= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nlopes/slack v0.6.1-0.20191106133607-d06c2a2b3249/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk= +github.com/nrdcg/auroradns v1.0.0/go.mod h1:6JPXKzIRzZzMqtTDgueIhTi6rFf1QvYE/HzqidhOhjw= +github.com/nrdcg/dnspod-go v0.4.0/go.mod h1:vZSoFSFeQVm2gWLMkyX61LZ8HI3BaqtHZWgPTGKr6KQ= +github.com/nrdcg/goinwx v0.6.1/go.mod h1:XPiut7enlbEdntAqalBIqcYcTEVhpv/dKWgDCX2SwKQ= +github.com/nrdcg/namesilo v0.2.1/go.mod h1:lwMvfQTyYq+BbjJd30ylEG4GPSS6PII0Tia4rRpRiyw= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.0-20180130162743-b8a9be070da4/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -597,6 +780,13 @@ github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -607,6 +797,9 @@ github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxS github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= +github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ= +github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= github.com/packethost/packngo v0.1.1-0.20180711074735-b9cb5096f54c h1:vwpFWvAO8DeIZfFeqASzZfsxuWPno9ncAebBEP0N3uE= github.com/packethost/packngo v0.1.1-0.20180711074735-b9cb5096f54c/go.mod h1:otzZQXgoO96RTzDB/Hycg0qZcXZsWJGJRSXbmEIJ+4M= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= @@ -644,10 +837,13 @@ github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4 github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.8.0 h1:zvJNkoCFAnYFNC24FV8nW4JdRJ3GIFcLbg65lL/JDcw= github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= +github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= +github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -659,25 +855,32 @@ github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7q github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.14.0 h1:RHRyE8UocrbjU+6UvRzwi6HjiDfxrrBU91TtbKzkGp4= github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rainycape/memcache v0.0.0-20150622160815-1031fa0ce2f2/go.mod h1:7tZKcyumwBO6qip7RNQ5r77yrssm9bfCowcLEBcU5IA= github.com/rboyer/safeio v0.2.1/go.mod h1:Cq/cEPK+YXFn622lsQ0K4KsPZSPtaptHHEldsy7Fmig= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/renier/xmlrpc v0.0.0-20170708154548-ce4a1a486c03 h1:Wdi9nwnhFNAlseAOekn6B5G/+GMtks9UKbvRU/CMM/o= github.com/renier/xmlrpc v0.0.0-20170708154548-ce4a1a486c03/go.mod h1:gRAiPF5C5Nd0eyyRdqIu9qTiFSoZzpTq727b5B8fkkU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/zerolog v1.4.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= @@ -686,6 +889,7 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/sacloud/libsacloud v1.26.1/go.mod h1:79ZwATmHLIFZIMd7sxA3LwzVy/B77uj3LDoToVTxDoQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b h1:gQZ0qzfKHQIybLANtM3mBXNUtOfsCFXeTsnBqCsx1KM= @@ -694,6 +898,7 @@ github.com/sean-/conswriter v0.0.0-20180208195008-f5ae3917a627/go.mod h1:7zjs06q github.com/sean-/pager v0.0.0-20180208200047-666be9bf53b5/go.mod h1:BeybITEsBEg6qbIiqJ6/Bqeq25bCLbL7YFmpaFfJDuM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil v0.0.0-20181107111621-48177ef5f880 h1:1Ge4j/3uB2rxzPWD3TC+daeCw+w91z8UCUL/7WH5gn8= github.com/shirou/gopsutil v0.0.0-20181107111621-48177ef5f880/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 h1:udFKJ0aHUL60LboW/A+DfgoHVedieIzIXE8uylPue0U= @@ -702,9 +907,11 @@ github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9Nz github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -752,33 +959,61 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tebeka/strftime v0.1.3 h1:5HQXOqWKYRFfNyBMNVc9z5+QzuBtIXy03psIhtdJYto= github.com/tebeka/strftime v0.1.3/go.mod h1:7wJm3dZlpr4l/oVK0t1HYIc4rMzQ2XJlOMIUJUJH6XQ= +github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog= github.com/tencentcloud/tencentcloud-sdk-go v3.0.83+incompatible h1:8uRvJleFpqLsO77WaAh2UrasMOzd8MxXrNj20e7El+Q= github.com/tencentcloud/tencentcloud-sdk-go v3.0.83+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4= github.com/tent/http-link-go v0.0.0-20130702225549-ac974c61c2f9/go.mod h1:RHkNRtSLfOK7qBTHaeSX1D6BNpI3qw7NTxsmNr4RvN8= github.com/tevid/gohamcrest v1.1.1 h1:ou+xSqlIw1xfGTg1uq1nif/htZ2S3EzRqLm2BP+tYU0= github.com/tevid/gohamcrest v1.1.1/go.mod h1:3UvtWlqm8j5JbwYZh80D/PVBt0mJ1eJiYgZMibh0H/k= +github.com/timewasted/linode v0.0.0-20160829202747-37e84520dcf7/go.mod h1:imsgLplxEC/etjIhdr3dNzV3JeT27LbVu5pYWm0JCBY= github.com/tinylib/msgp v1.1.0 h1:9fQd+ICuRIu/ue4vxJZu6/LzxN0HwMds2nq/0cFvxHU= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/toolkits/concurrent v0.0.0-20150624120057-a4371d70e3e3 h1:kF/7m/ZU+0D4Jj5eZ41Zm3IH/J8OElK1Qtd7tVKAwLk= github.com/toolkits/concurrent v0.0.0-20150624120057-a4371d70e3e3/go.mod h1:QDlpd3qS71vYtakd2hmdpqhJ9nwv6mD6A30bQ1BPBFE= +github.com/transip/gotransip v0.0.0-20190812104329-6d8d9179b66f/go.mod h1:i0f4R4o2HM0m3DZYQWsj6/MEowD57VzoH0v3d7igeFY= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/vmware/govmomi v0.18.0 h1:f7QxSmP7meCtoAmiKZogvVbLInT+CZx6Px6K5rYsJZo= github.com/vmware/govmomi v0.18.0/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= +github.com/vultr/govultr v0.1.4/go.mod h1:9H008Uxr/C4vFNGLqKx232C206GL0PBHzOP0809bGNA= +github.com/wenxuwan/gost v1.9.4-0.20210302062512-1556cdf1d101/go.mod h1:I1V26ofEK1+4l48D2vDkuTxW2jInvt83MqKQ3P+Sl5Y= +github.com/wenxuwan/gost v1.9.4-0.20210302063022-6b9b17ad3c8a h1:+9K9TcsUxQzTktj5I66oNkq/VbwRBeKbOgPGmmofG8o= +github.com/wenxuwan/gost v1.9.4-0.20210302063022-6b9b17ad3c8a/go.mod h1:I1V26ofEK1+4l48D2vDkuTxW2jInvt83MqKQ3P+Sl5Y= +github.com/wenxuwan/gost v1.9.4-0.20210302073456-846ce528eb63 h1:uWjgNklk3bmU9uQQIcYxIevVlRlDhIfWOS2djKtUV0A= +github.com/wenxuwan/gost v1.9.4-0.20210302073456-846ce528eb63/go.mod h1:I1V26ofEK1+4l48D2vDkuTxW2jInvt83MqKQ3P+Sl5Y= +github.com/wenxuwan/gost v1.9.4-0.20210302082346-4f0dc3bef61f h1:V5XL115SW539g25+QeASGE7vbBg4BJOf9hxkZSZhOIY= +github.com/wenxuwan/gost v1.9.4-0.20210302082346-4f0dc3bef61f/go.mod h1:I1V26ofEK1+4l48D2vDkuTxW2jInvt83MqKQ3P+Sl5Y= github.com/willf/bitset v1.1.10 h1:NotGKqX0KwQ72NUzqrjZq5ipPNDQex9lo3WpaS8L2sc= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zouyx/agollo/v3 v3.4.5 h1:7YCxzY9ZYaH9TuVUBvmI6Tk0mwMggikah+cfbYogcHQ= github.com/zouyx/agollo/v3 v3.4.5/go.mod h1:LJr3kDmm23QSW+F1Ol4TMHDa7HvJvscMdVxJ2IpUTVc= @@ -804,6 +1039,7 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/ go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/ratelimit v0.0.0-20180316092928-c15da0234277/go.mod h1:2X8KaoNd1J0lZV+PxJk/5+DGbO/tpwLR1m++a7FnB/Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -811,19 +1047,29 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -831,6 +1077,8 @@ golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -840,6 +1088,7 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= @@ -847,9 +1096,12 @@ golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCc golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -860,6 +1112,7 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190228165749-92fc7df08ae7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -868,18 +1121,28 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190930134127-c5a3c61f89f3/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191027093000-83d349e8ac1a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -888,7 +1151,10 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180622082034-63fc586f45fe/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -901,6 +1167,7 @@ golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -909,15 +1176,20 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190508220229-2d0786266e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -927,11 +1199,16 @@ golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211 h1:9UQO31fZ+0aKQOFldThf7BKPMJTiBfWycGh/u3UoO88= golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201223074533-0d417f636930 h1:vRgIt+nup/B/BwIS0g2oC0haq0iqbV3ZA+u6+0TlNCo= golang.org/x/sys v0.0.0-20201223074533-0d417f636930/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -940,11 +1217,16 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -970,10 +1252,18 @@ golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200928182047-19e03678916f h1:VwGa2Wf+rHGIxvsssCkUNIyFv8jQY0VCBCNWtikoWq0= golang.org/x/tools v0.0.0-20200928182047-19e03678916f/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a h1:CB3a9Nez8M13wwlr/E2YtwoU+qYHKfC+JrDa45RXXoQ= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -986,6 +1276,8 @@ google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEn google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0 h1:Q3Ui3V3/CVinFWFiW39Iw0kMuVrRzYX0wN6OPFp0lTA= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0 h1:uMf5uLi4eQMRrMKhCplNik4U4H8Z6C1br3zOtAa/aDE= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -994,6 +1286,7 @@ google.golang.org/appengine v1.6.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1005,6 +1298,13 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a h1:Ob5/580gVHBJZgXnff1cZDbG+xLtMVE5mDRTe+nIsX4= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884 h1:fiNLklpBwWK1mth30Hlwk+fcdBmIALlgF5iy77O37Ig= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98 h1:LCO0fg4kb6WwkXQXRQQgUYsFeFb5taTX5WAx5O/Vt28= +google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -1017,15 +1317,29 @@ google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1 h1:DGeFlSan2f+WEtCERJ4J9GJWk15TxUi8QGagfI87Xyc= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.36.0 h1:o1bcQ6imQMIOpdrO3SWf2z5RV72WbDwdXuK0MDlc8As= +google.golang.org/grpc/examples v0.0.0-20210301210255-fc8f38cccf75 h1:IFbcGka/Xo8VIhRtCz9UBaDblKK7/iwLiXwm9D62Jzk= +google.golang.org/grpc/examples v0.0.0-20210301210255-fc8f38cccf75/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= @@ -1033,28 +1347,38 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= +gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= +gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.44.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ns1/ns1-go.v2 v2.0.0-20190730140822-b51389932cbc/go.mod h1:VV+3haRsgDiVLxyifmMBrBIuCWFBPYKbRssXB9z67Hw= +gopkg.in/resty.v1 v1.9.1/go.mod h1:vo52Hzryw9PnPHcJfPsBiFW62XhNx5OczbV9y+IMpgc= gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.4.1 h1:H0TmLt7/KmzlrDOpa1F+zr0Tk90PbJYBfsVUmRLrf9Y= gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/telegram-bot-api.v4 v4.6.4/go.mod h1:5DpGO5dbumb40px+dXcwCpcjmeHNYLpk0bp3XRNvWDM= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1063,6 +1387,7 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1085,6 +1410,7 @@ k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a h1:UcxjrRMyNx/i/y8G7kPvLyy7rfbeuf1PYyBf973pgyU= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20190801114015-581e00157fb1 h1:+ySTxfHnfzZb9ys375PXNlLhkJPLKgHajBU0N62BDvE= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= @@ -1092,4 +1418,6 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/metadata/report/zookeeper/report.go b/metadata/report/zookeeper/report.go index 5d5e74007b..c124279174 100644 --- a/metadata/report/zookeeper/report.go +++ b/metadata/report/zookeeper/report.go @@ -22,6 +22,9 @@ import ( "time" ) +import ( + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" +) import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/constant" @@ -29,7 +32,6 @@ import ( "github.com/apache/dubbo-go/metadata/identifier" "github.com/apache/dubbo-go/metadata/report" "github.com/apache/dubbo-go/metadata/report/factory" - "github.com/apache/dubbo-go/remoting/zookeeper" ) var ( @@ -46,7 +48,7 @@ func init() { // zookeeperMetadataReport is the implementation of // MetadataReport based on zookeeper. type zookeeperMetadataReport struct { - client *zookeeper.ZookeeperClient + client *gxzookeeper.ZookeeperClient rootDir string } @@ -112,10 +114,11 @@ type zookeeperMetadataReportFactory struct { // nolint func (mf *zookeeperMetadataReportFactory) CreateMetadataReport(url *common.URL) report.MetadataReport { - client, err := zookeeper.NewZookeeperClient( + client, err := gxzookeeper.NewZookeeperClient( "zookeeperMetadataReport", strings.Split(url.Location, ","), - 15*time.Second, + false, + gxzookeeper.WithZkTimeOut(15*time.Second), ) if err != nil { panic(err) diff --git a/registry/zookeeper/listener.go b/registry/zookeeper/listener.go index 515d79caa8..5a7d14b28a 100644 --- a/registry/zookeeper/listener.go +++ b/registry/zookeeper/listener.go @@ -18,6 +18,7 @@ package zookeeper import ( + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" "strings" "sync" ) @@ -32,7 +33,6 @@ import ( "github.com/apache/dubbo-go/config_center" "github.com/apache/dubbo-go/registry" "github.com/apache/dubbo-go/remoting" - zk "github.com/apache/dubbo-go/remoting/zookeeper" ) // RegistryDataListener contains all URL information subscribed by zookeeper registry @@ -113,7 +113,7 @@ func (l *RegistryDataListener) Close() { // RegistryConfigurationListener represent the processor of zookeeper watcher type RegistryConfigurationListener struct { - client *zk.ZookeeperClient + client *gxzookeeper.ZookeeperClient registry *zkRegistry events chan *config_center.ConfigChangeEvent isClosed bool @@ -123,7 +123,7 @@ type RegistryConfigurationListener struct { } // NewRegistryConfigurationListener for listening the event of zk. -func NewRegistryConfigurationListener(client *zk.ZookeeperClient, reg *zkRegistry, conf *common.URL) *RegistryConfigurationListener { +func NewRegistryConfigurationListener(client *gxzookeeper.ZookeeperClient, reg *zkRegistry, conf *common.URL) *RegistryConfigurationListener { reg.WaitGroup().Add(1) return &RegistryConfigurationListener{ client: client, diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go index 09cd47ed80..c184239363 100644 --- a/registry/zookeeper/registry.go +++ b/registry/zookeeper/registry.go @@ -27,6 +27,7 @@ import ( import ( "github.com/dubbogo/go-zookeeper/zk" + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" perrors "github.com/pkg/errors" ) @@ -54,7 +55,7 @@ func init() { type zkRegistry struct { registry.BaseRegistry - client *zookeeper.ZookeeperClient + client *gxzookeeper.ZookeeperClient listenerLock sync.Mutex listener *zookeeper.ZkEventListener dataListener *RegistryDataListener @@ -73,7 +74,7 @@ func newZkRegistry(url *common.URL) (registry.Registry, error) { } r.InitBaseRegistry(url, r) - err = zookeeper.ValidateZookeeperClient(r, zookeeper.WithZkName(RegistryZkClient)) + err = zookeeper.ValidateZookeeperClient(r, RegistryZkClient) if err != nil { return nil, err } @@ -89,13 +90,13 @@ func newZkRegistry(url *common.URL) (registry.Registry, error) { // nolint type Options struct { - client *zookeeper.ZookeeperClient + client *gxzookeeper.ZookeeperClient } // nolint type Option func(*Options) -func newMockZkRegistry(url *common.URL, opts ...zookeeper.Option) (*zk.TestCluster, *zkRegistry, error) { +func newMockZkRegistry(url *common.URL, opts ...gxzookeeper.Option) (*zk.TestCluster, *zkRegistry, error) { var ( err error r *zkRegistry @@ -107,7 +108,7 @@ func newMockZkRegistry(url *common.URL, opts ...zookeeper.Option) (*zk.TestClust zkPath: make(map[string]int), } r.InitBaseRegistry(url, r) - c, r.client, _, err = zookeeper.NewMockZookeeperClient("test", 15*time.Second, opts...) + c, r.client, _, err = gxzookeeper.NewMockZookeeperClient("test", 15*time.Second, opts...) if err != nil { return nil, nil, err } @@ -183,12 +184,12 @@ func (r *zkRegistry) CloseAndNilClient() { } // nolint -func (r *zkRegistry) ZkClient() *zookeeper.ZookeeperClient { +func (r *zkRegistry) ZkClient() *gxzookeeper.ZookeeperClient { return r.client } // nolint -func (r *zkRegistry) SetZkClient(client *zookeeper.ZookeeperClient) { +func (r *zkRegistry) SetZkClient(client *gxzookeeper.ZookeeperClient) { r.client = client } diff --git a/registry/zookeeper/registry_test.go b/registry/zookeeper/registry_test.go index e093175a29..169f5b5009 100644 --- a/registry/zookeeper/registry_test.go +++ b/registry/zookeeper/registry_test.go @@ -24,13 +24,13 @@ import ( ) import ( + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" "github.com/stretchr/testify/assert" ) import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/constant" - "github.com/apache/dubbo-go/remoting/zookeeper" ) func Test_Register(t *testing.T) { @@ -93,7 +93,7 @@ func Test_Subscribe(t *testing.T) { //consumer register regURL.SetParam(constant.ROLE_KEY, strconv.Itoa(common.CONSUMER)) - _, reg2, _ := newMockZkRegistry(regURL, zookeeper.WithTestCluster(ts)) + _, reg2, _ := newMockZkRegistry(regURL, gxzookeeper.WithTestCluster(ts)) err = reg2.Register(url) assert.Nil(t, err) @@ -125,7 +125,7 @@ func Test_UnSubscribe(t *testing.T) { //consumer register regURL.SetParam(constant.ROLE_KEY, strconv.Itoa(common.CONSUMER)) - _, reg2, _ := newMockZkRegistry(regURL, zookeeper.WithTestCluster(ts)) + _, reg2, _ := newMockZkRegistry(regURL, gxzookeeper.WithTestCluster(ts)) err = reg2.Register(url) assert.Nil(t, err) diff --git a/registry/zookeeper/service_discovery.go b/registry/zookeeper/service_discovery.go index d053fe38d5..8fa36eec38 100644 --- a/registry/zookeeper/service_discovery.go +++ b/registry/zookeeper/service_discovery.go @@ -19,6 +19,7 @@ package zookeeper import ( "fmt" + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" "net/url" "strconv" "strings" @@ -59,7 +60,7 @@ func init() { } type zookeeperServiceDiscovery struct { - client *zookeeper.ZookeeperClient + client *gxzookeeper.ZookeeperClient csd *curator_discovery.ServiceDiscovery //listener *zookeeper.ZkEventListener url *common.URL @@ -106,7 +107,7 @@ func newZookeeperServiceDiscovery(name string) (registry.ServiceDiscovery, error url: url, rootPath: rootPath, } - err := zookeeper.ValidateZookeeperClient(zksd, zookeeper.WithZkName(ServiceDiscoveryZkClient)) + err := zookeeper.ValidateZookeeperClient(zksd, ServiceDiscoveryZkClient) if err != nil { return nil, err } @@ -117,12 +118,12 @@ func newZookeeperServiceDiscovery(name string) (registry.ServiceDiscovery, error } // nolint -func (zksd *zookeeperServiceDiscovery) ZkClient() *zookeeper.ZookeeperClient { +func (zksd *zookeeperServiceDiscovery) ZkClient() *gxzookeeper.ZookeeperClient { return zksd.client } // nolint -func (zksd *zookeeperServiceDiscovery) SetZkClient(client *zookeeper.ZookeeperClient) { +func (zksd *zookeeperServiceDiscovery) SetZkClient(client *gxzookeeper.ZookeeperClient) { zksd.client = client } diff --git a/remoting/exchange_client.go b/remoting/exchange_client.go index 6d57a1471e..672c1ecf16 100644 --- a/remoting/exchange_client.go +++ b/remoting/exchange_client.go @@ -18,10 +18,12 @@ package remoting import ( "errors" - "sync/atomic" "time" ) +import ( + uatomic "go.uber.org/atomic" +) import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/logger" @@ -53,7 +55,7 @@ type ExchangeClient struct { // the tag for init. init bool // the number of service using the exchangeClient - activeNum uint32 + activeNum uatomic.Uint32 } // create ExchangeClient @@ -62,7 +64,6 @@ func NewExchangeClient(url *common.URL, client Client, connectTimeout time.Durat ConnectTimeout: connectTimeout, address: url.Location, client: client, - activeNum: 0, } client.SetExchangeClient(exchangeClient) if !lazyInit { @@ -93,17 +94,17 @@ func (cl *ExchangeClient) doInit(url *common.URL) error { // increase number of service using client func (client *ExchangeClient) IncreaseActiveNumber() uint32 { - return atomic.AddUint32(&client.activeNum, 1) + return client.activeNum.Add(1) } // decrease number of service using client func (client *ExchangeClient) DecreaseActiveNumber() uint32 { - return atomic.AddUint32(&client.activeNum, ^uint32(0)) + return client.activeNum.Sub(1) } // get number of service using client func (client *ExchangeClient) GetActiveNumber() uint32 { - return atomic.LoadUint32(&client.activeNum) + return client.activeNum.Load() } // two way request diff --git a/remoting/zookeeper/client.go b/remoting/zookeeper/client.go index 80d3073d22..5d39666ebd 100644 --- a/remoting/zookeeper/client.go +++ b/remoting/zookeeper/client.go @@ -18,15 +18,12 @@ package zookeeper import ( - "path" "strings" - "sync" - "sync/atomic" "time" ) import ( - "github.com/dubbogo/go-zookeeper/zk" + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" perrors "github.com/pkg/errors" ) @@ -48,85 +45,8 @@ var ( errNilNode = perrors.Errorf("node does not exist") ) -var ( - zkClientPool ZookeeperClientPool - once sync.Once -) - -type ZookeeperClientPool struct { - sync.Mutex - zkClient map[string]*ZookeeperClient -} - -// ZookeeperClient represents zookeeper client Configuration -type ZookeeperClient struct { - name string - ZkAddrs []string - sync.RWMutex // for conn - Conn *zk.Conn - activeNumber uint32 - Timeout time.Duration - Wait sync.WaitGroup - valid uint32 - reconnectCh chan struct{} - eventRegistry map[string][]*chan struct{} - eventRegistryLock sync.RWMutex -} - -// nolint -func StateToString(state zk.State) string { - switch state { - case zk.StateDisconnected: - return "zookeeper disconnected" - case zk.StateConnecting: - return "zookeeper connecting" - case zk.StateAuthFailed: - return "zookeeper auth failed" - case zk.StateConnectedReadOnly: - return "zookeeper connect readonly" - case zk.StateSaslAuthenticated: - return "zookeeper sasl authenticated" - case zk.StateExpired: - return "zookeeper connection expired" - case zk.StateConnected: - return "zookeeper connected" - case zk.StateHasSession: - return "zookeeper has session" - case zk.StateUnknown: - return "zookeeper unknown state" - case zk.State(zk.EventNodeDeleted): - return "zookeeper node deleted" - case zk.State(zk.EventNodeDataChanged): - return "zookeeper node data changed" - default: - return state.String() - } -} - -// nolint -type Options struct { - zkName string - client *ZookeeperClient - ts *zk.TestCluster -} - -// Option will define a function of handling Options -type Option func(*Options) - -// WithZkName sets zk client name -func WithZkName(name string) Option { - return func(opt *Options) { - opt.zkName = name - } -} - // ValidateZookeeperClient validates client and sets options -func ValidateZookeeperClient(container ZkClientFacade, opts ...Option) error { - options := &Options{} - for _, opt := range opts { - opt(options) - } - +func ValidateZookeeperClient(container ZkClientFacade, zkName string) error { lock := container.ZkClientLock() url := container.GetUrl() @@ -142,485 +62,13 @@ func ValidateZookeeperClient(container ZkClientFacade, opts ...Option) error { return perrors.WithMessagef(paramErr, "newZookeeperClient(address:%+v)", url.Location) } zkAddresses := strings.Split(url.Location, ",") - newClient, cltErr := getZookeeperClient(options.zkName, zkAddresses, timeout) + newClient, cltErr := gxzookeeper.NewZookeeperClient(zkName, zkAddresses, true, gxzookeeper.WithZkTimeOut(timeout)) if cltErr != nil { logger.Warnf("newZookeeperClient(name{%s}, zk address{%v}, timeout{%d}) = error{%v}", - options.zkName, url.Location, timeout.String(), cltErr) + zkName, url.Location, timeout.String(), cltErr) return perrors.WithMessagef(cltErr, "newZookeeperClient(address:%+v)", url.Location) } container.SetZkClient(newClient) } return nil } - -func initZookeeperClientPool() { - zkClientPool.zkClient = make(map[string]*ZookeeperClient) -} -func getZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (*ZookeeperClient, error) { - once.Do(initZookeeperClientPool) - zkClientPool.Lock() - defer zkClientPool.Unlock() - if zkClient, ok := zkClientPool.zkClient[name]; ok { - zkClient.activeNumber++ - return zkClient, nil - } - zkClient, err := NewZookeeperClient(name, zkAddrs, timeout) - if err != nil { - return nil, err - } - zkClientPool.zkClient[name] = zkClient - zkClient.activeNumber++ - return zkClient, nil -} - -// nolint -func NewZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (*ZookeeperClient, error) { - var ( - err error - event <-chan zk.Event - z *ZookeeperClient - ) - - z = &ZookeeperClient{ - name: name, - ZkAddrs: zkAddrs, - Timeout: timeout, - activeNumber: 0, - reconnectCh: make(chan struct{}), - eventRegistry: make(map[string][]*chan struct{}), - } - // connect to zookeeper - z.Conn, event, err = zk.Connect(zkAddrs, timeout) - if err != nil { - return nil, perrors.WithMessagef(err, "zk.Connect(zkAddrs:%+v)", zkAddrs) - } - - atomic.StoreUint32(&z.valid, 1) - go z.HandleZkEvent(event) - return z, nil -} - -// WithTestCluster sets test cluster for zk client -func WithTestCluster(ts *zk.TestCluster) Option { - return func(opt *Options) { - opt.ts = ts - } -} - -// NewMockZookeeperClient returns a mock client instance -func NewMockZookeeperClient(name string, timeout time.Duration, opts ...Option) (*zk.TestCluster, *ZookeeperClient, <-chan zk.Event, error) { - var ( - err error - event <-chan zk.Event - z *ZookeeperClient - ts *zk.TestCluster - ) - - z = &ZookeeperClient{ - name: name, - ZkAddrs: []string{}, - Timeout: timeout, - reconnectCh: make(chan struct{}), - eventRegistry: make(map[string][]*chan struct{}), - } - - options := &Options{} - for _, opt := range opts { - opt(options) - } - - // connect to zookeeper - if options.ts != nil { - ts = options.ts - } else { - ts, err = zk.StartTestCluster(1, nil, nil) - if err != nil { - return nil, nil, nil, perrors.WithMessagef(err, "zk.Connect") - } - } - - z.Conn, event, err = ts.ConnectWithOptions(timeout) - if err != nil { - return nil, nil, nil, perrors.WithMessagef(err, "zk.Connect") - } - atomic.StoreUint32(&z.valid, 1) - z.activeNumber++ - return ts, z, event, nil -} - -// HandleZkEvent handles zookeeper events -func (z *ZookeeperClient) HandleZkEvent(session <-chan zk.Event) { - var ( - state int - event zk.Event - ) - - defer func() { - logger.Infof("zk{path:%v, name:%s} connection goroutine game over.", z.ZkAddrs, z.name) - }() - - for { - select { - case event = <-session: - logger.Infof("client{%s} get a zookeeper event{type:%s, server:%s, path:%s, state:%d-%s, err:%v}", - z.name, event.Type, event.Server, event.Path, event.State, StateToString(event.State), event.Err) - switch (int)(event.State) { - case (int)(zk.StateDisconnected): - atomic.StoreUint32(&z.valid, 0) - logger.Warnf("zk{addr:%s} state is StateDisconnected, so close the zk client{name:%s}.", z.ZkAddrs, z.name) - case (int)(zk.EventNodeDataChanged), (int)(zk.EventNodeChildrenChanged): - logger.Infof("zkClient{%s} get zk node changed event{path:%s}", z.name, event.Path) - z.eventRegistryLock.RLock() - for p, a := range z.eventRegistry { - if strings.HasPrefix(p, event.Path) { - logger.Infof("send event{state:zk.EventNodeDataChange, Path:%s} notify event to path{%s} related listener", - event.Path, p) - for _, e := range a { - *e <- struct{}{} - } - } - } - z.eventRegistryLock.RUnlock() - case (int)(zk.StateConnecting), (int)(zk.StateConnected), (int)(zk.StateHasSession): - if state == (int)(zk.StateHasSession) { - continue - } - if event.State == zk.StateHasSession { - atomic.StoreUint32(&z.valid, 1) - close(z.reconnectCh) - z.reconnectCh = make(chan struct{}) - } - z.eventRegistryLock.RLock() - if a, ok := z.eventRegistry[event.Path]; ok && 0 < len(a) { - for _, e := range a { - *e <- struct{}{} - } - } - z.eventRegistryLock.RUnlock() - } - state = (int)(event.State) - } - } -} - -// RegisterEvent registers zookeeper events -func (z *ZookeeperClient) RegisterEvent(zkPath string, event *chan struct{}) { - if zkPath == "" || event == nil { - return - } - - z.eventRegistryLock.Lock() - defer z.eventRegistryLock.Unlock() - a := z.eventRegistry[zkPath] - a = append(a, event) - z.eventRegistry[zkPath] = a - logger.Debugf("zkClient{%s} register event{path:%s, ptr:%p}", z.name, zkPath, event) -} - -// UnregisterEvent unregisters zookeeper events -func (z *ZookeeperClient) UnregisterEvent(zkPath string, event *chan struct{}) { - if zkPath == "" { - return - } - - z.eventRegistryLock.Lock() - defer z.eventRegistryLock.Unlock() - infoList, ok := z.eventRegistry[zkPath] - if !ok { - return - } - for i, e := range infoList { - if e == event { - infoList = append(infoList[:i], infoList[i+1:]...) - logger.Infof("zkClient{%s} unregister event{path:%s, event:%p}", z.name, zkPath, event) - } - } - logger.Debugf("after zkClient{%s} unregister event{path:%s, event:%p}, array length %d", - z.name, zkPath, event, len(infoList)) - if len(infoList) == 0 { - delete(z.eventRegistry, zkPath) - } else { - z.eventRegistry[zkPath] = infoList - } -} - -// ZkConnValid validates zookeeper connection -func (z *ZookeeperClient) ZkConnValid() bool { - if atomic.LoadUint32(&z.valid) == 1 { - return true - } - return false -} - -// Create will create the node recursively, which means that if the parent node is absent, -// it will create parent node first. -// And the value for the basePath is "" -func (z *ZookeeperClient) Create(basePath string) error { - return z.CreateWithValue(basePath, []byte("")) -} - -// CreateWithValue will create the node recursively, which means that if the parent node is absent, -// it will create parent node first. -func (z *ZookeeperClient) CreateWithValue(basePath string, value []byte) error { - var ( - err error - tmpPath string - ) - - logger.Debugf("zookeeperClient.Create(basePath{%s})", basePath) - conn := z.getConn() - err = errNilZkClientConn - if conn == nil { - return perrors.WithMessagef(err, "zk.Create(path:%s)", basePath) - } - - for _, str := range strings.Split(basePath, "/")[1:] { - tmpPath = path.Join(tmpPath, "/", str) - _, err = conn.Create(tmpPath, value, 0, zk.WorldACL(zk.PermAll)) - - if err != nil { - if err == zk.ErrNodeExists { - logger.Debugf("zk.create(\"%s\") exists", tmpPath) - } else { - logger.Errorf("zk.create(\"%s\") error(%v)", tmpPath, perrors.WithStack(err)) - return perrors.WithMessagef(err, "zk.Create(path:%s)", basePath) - } - } - } - - return nil -} - -// CreateTempWithValue will create the node recursively, which means that if the parent node is absent, -// it will create parent node first,and set value in last child path -// If the path exist, it will update data -func (z *ZookeeperClient) CreateTempWithValue(basePath string, value []byte) error { - var ( - err error - tmpPath string - ) - - logger.Debugf("zookeeperClient.Create(basePath{%s})", basePath) - conn := z.getConn() - err = errNilZkClientConn - if conn == nil { - return perrors.WithMessagef(err, "zk.Create(path:%s)", basePath) - } - - pathSlice := strings.Split(basePath, "/")[1:] - length := len(pathSlice) - for i, str := range pathSlice { - tmpPath = path.Join(tmpPath, "/", str) - // last child need be ephemeral - if i == length-1 { - _, err = conn.Create(tmpPath, value, zk.FlagEphemeral, zk.WorldACL(zk.PermAll)) - if err == zk.ErrNodeExists { - return err - } - } else { - _, err = conn.Create(tmpPath, []byte{}, 0, zk.WorldACL(zk.PermAll)) - } - if err != nil { - if err == zk.ErrNodeExists { - logger.Debugf("zk.create(\"%s\") exists", tmpPath) - } else { - logger.Errorf("zk.create(\"%s\") error(%v)", tmpPath, perrors.WithStack(err)) - return perrors.WithMessagef(err, "zk.Create(path:%s)", basePath) - } - } - } - - return nil -} - -// nolint -func (z *ZookeeperClient) Delete(basePath string) error { - err := errNilZkClientConn - conn := z.getConn() - if conn != nil { - err = conn.Delete(basePath, -1) - } - - return perrors.WithMessagef(err, "Delete(basePath:%s)", basePath) -} - -// RegisterTemp registers temporary node by @basePath and @node -func (z *ZookeeperClient) RegisterTemp(basePath string, node string) (string, error) { - var ( - err error - zkPath string - tmpPath string - ) - - err = errNilZkClientConn - zkPath = path.Join(basePath) + "/" + node - conn := z.getConn() - if conn != nil { - tmpPath, err = conn.Create(zkPath, []byte(""), zk.FlagEphemeral, zk.WorldACL(zk.PermAll)) - } - - if err != nil { - logger.Warnf("conn.Create(\"%s\", zk.FlagEphemeral) = error(%v)", zkPath, perrors.WithStack(err)) - return zkPath, perrors.WithStack(err) - } - logger.Debugf("zkClient{%s} create a temp zookeeper node:%s", z.name, tmpPath) - - return tmpPath, nil -} - -// RegisterTempSeq register temporary sequence node by @basePath and @data -func (z *ZookeeperClient) RegisterTempSeq(basePath string, data []byte) (string, error) { - var ( - err error - tmpPath string - ) - - err = errNilZkClientConn - conn := z.getConn() - if conn != nil { - tmpPath, err = conn.Create( - path.Join(basePath)+"/", - data, - zk.FlagEphemeral|zk.FlagSequence, - zk.WorldACL(zk.PermAll), - ) - } - - logger.Debugf("zookeeperClient.RegisterTempSeq(basePath{%s}) = tempPath{%s}", basePath, tmpPath) - if err != nil && err != zk.ErrNodeExists { - logger.Errorf("zkClient{%s} conn.Create(\"%s\", \"%s\", zk.FlagEphemeral|zk.FlagSequence) error(%v)", - z.name, basePath, string(data), err) - return "", perrors.WithStack(err) - } - logger.Debugf("zkClient{%s} create a temp zookeeper node:%s", z.name, tmpPath) - - return tmpPath, nil -} - -// GetChildrenW gets children watch by @path -func (z *ZookeeperClient) GetChildrenW(path string) ([]string, <-chan zk.Event, error) { - var ( - err error - children []string - stat *zk.Stat - watcher *zk.Watcher - ) - - err = errNilZkClientConn - conn := z.getConn() - if conn != nil { - children, stat, watcher, err = conn.ChildrenW(path) - } - - if err != nil { - if err == zk.ErrNoChildrenForEphemerals { - return nil, nil, errNilChildren - } - if err == zk.ErrNoNode { - return nil, nil, errNilNode - } - logger.Warnf("zk.ChildrenW(path{%s}) = error(%v)", path, err) - return nil, nil, perrors.WithMessagef(err, "zk.ChildrenW(path:%s)", path) - } - if stat == nil { - return nil, nil, perrors.Errorf("path{%s} get stat is nil", path) - } - if len(children) == 0 { - return nil, nil, errNilChildren - } - - return children, watcher.EvtCh, nil -} - -// GetChildren gets children by @path -func (z *ZookeeperClient) GetChildren(path string) ([]string, error) { - var ( - err error - children []string - stat *zk.Stat - ) - - err = errNilZkClientConn - conn := z.getConn() - if conn != nil { - children, stat, err = conn.Children(path) - } - - if err != nil { - if err == zk.ErrNoNode { - return nil, perrors.Errorf("path{%s} has none children", path) - } - logger.Errorf("zk.Children(path{%s}) = error(%v)", path, perrors.WithStack(err)) - return nil, perrors.WithMessagef(err, "zk.Children(path:%s)", path) - } - if stat == nil { - return nil, perrors.Errorf("path{%s} has none children", path) - } - if len(children) == 0 { - return nil, errNilChildren - } - - return children, nil -} - -// ExistW to judge watch whether it exists or not by @zkPath -func (z *ZookeeperClient) ExistW(zkPath string) (<-chan zk.Event, error) { - var ( - exist bool - err error - watcher *zk.Watcher - ) - - err = errNilZkClientConn - conn := z.getConn() - if conn != nil { - exist, _, watcher, err = conn.ExistsW(zkPath) - } - - if err != nil { - logger.Warnf("zkClient{%s}.ExistsW(path{%s}) = error{%v}.", z.name, zkPath, perrors.WithStack(err)) - return nil, perrors.WithMessagef(err, "zk.ExistsW(path:%s)", zkPath) - } - if !exist { - logger.Warnf("zkClient{%s}'s App zk path{%s} does not exist.", z.name, zkPath) - return nil, perrors.Errorf("zkClient{%s} App zk path{%s} does not exist.", z.name, zkPath) - } - - return watcher.EvtCh, nil -} - -// GetContent gets content by @zkPath -func (z *ZookeeperClient) GetContent(zkPath string) ([]byte, *zk.Stat, error) { - return z.Conn.Get(zkPath) -} - -// nolint -func (z *ZookeeperClient) SetContent(zkPath string, content []byte, version int32) (*zk.Stat, error) { - return z.Conn.Set(zkPath, content, version) -} - -// getConn gets zookeeper connection safely -func (z *ZookeeperClient) getConn() *zk.Conn { - if z == nil { - return nil - } - z.RLock() - defer z.RUnlock() - return z.Conn -} - -// Reconnect gets zookeeper reconnect event -func (z *ZookeeperClient) Reconnect() <-chan struct{} { - return z.reconnectCh -} - -// In my opinion, this method should never called by user, here just for lint -func (z *ZookeeperClient) Close() { - zkClientPool.Lock() - defer zkClientPool.Unlock() - z.activeNumber-- - if z.activeNumber == 0 { - z.Conn.Close() - delete(zkClientPool.zkClient, z.name) - } -} diff --git a/remoting/zookeeper/client_test.go b/remoting/zookeeper/client_test.go deleted file mode 100644 index ed90a155c9..0000000000 --- a/remoting/zookeeper/client_test.go +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package zookeeper - -import ( - "strconv" - "testing" - "time" -) - -import ( - "github.com/dubbogo/go-zookeeper/zk" - "github.com/stretchr/testify/assert" -) - -import ( - "github.com/apache/dubbo-go/common/logger" -) - -func verifyEventStateOrder(t *testing.T, c <-chan zk.Event, expectedStates []zk.State, source string) { - for _, state := range expectedStates { - for { - event, ok := <-c - if !ok { - t.Fatalf("unexpected channel close for %s", source) - } - logger.Debug(event) - if event.Type != zk.EventSession { - continue - } - - if event.State != state { - t.Fatalf("mismatched state order from %s, expected %v, received %v", source, state, event.State) - } - break - } - } -} - -//func Test_newZookeeperClient(t *testing.T) { -// ts, err := zk.StartTestCluster(1, nil, nil) -// if err != nil { -// t.Fatal(err) -// } -// defer ts.Stop() -// -// callbackChan := make(chan zk.Event) -// f := func(event zk.Event) { -// callbackChan <- event -// } -// -// zook, eventChan, err := ts.ConnectWithOptions(15*time.Second, zk.WithEventCallback(f)) -// if err != nil { -// t.Fatalf("Connect returned error: %+v", err) -// } -// -// states := []zk.State{zk.StateConnecting, zk.StateConnected, zk.StateHasSession} -// verifyEventStateOrder(t, callbackChan, states, "callback") -// verifyEventStateOrder(t, eventChan, states, "event channel") -// -// zook.Close() -// verifyEventStateOrder(t, callbackChan, []zk.State{zk.StateDisconnected}, "callback") -// verifyEventStateOrder(t, eventChan, []zk.State{zk.StateDisconnected}, "event channel") -// -//} - -func Test_getZookeeperClient(t *testing.T) { - var err error - var tc *zk.TestCluster - var address []string - tc, err = zk.StartTestCluster(1, nil, nil) - assert.NoError(t, err) - assert.NotNil(t, tc.Servers[0]) - address = append(address, "127.0.0.1:"+strconv.Itoa(tc.Servers[0].Port)) - client1, err := getZookeeperClient("test1", address, 3*time.Second) - assert.Nil(t, err) - client2, err := getZookeeperClient("test1", address, 3*time.Second) - assert.Nil(t, err) - client3, err := getZookeeperClient("test2", address, 3*time.Second) - assert.Nil(t, err) - assert.Equal(t, client1, client2) - assert.NotEqual(t, client1, client3) - client1.Close() - client2.Close() - client3.Close() - tc.Stop() -} - -func Test_Close(t *testing.T) { - var err error - var tc *zk.TestCluster - var address []string - tc, err = zk.StartTestCluster(1, nil, nil) - assert.NoError(t, err) - assert.NotNil(t, tc.Servers[0]) - address = append(address, "127.0.0.1:"+strconv.Itoa(tc.Servers[0].Port)) - client1, err := getZookeeperClient("test1", address, 3*time.Second) - assert.Nil(t, err) - client2, err := getZookeeperClient("test1", address, 3*time.Second) - assert.Nil(t, err) - assert.Equal(t, client2, client1) - client1.Close() - client3, err := getZookeeperClient("test1", address, 3*time.Second) - assert.Nil(t, err) - assert.Equal(t, client3, client2) - client2.Close() - assert.Equal(t, client1.activeNumber, uint32(1)) - client1.Close() - assert.Equal(t, client1.activeNumber, uint32(0)) - client4, err := getZookeeperClient("test1", address, 3*time.Second) - assert.Nil(t, err) - assert.Equal(t, client4.activeNumber, uint32(1)) - assert.NotEqual(t, client3, client4) - tc.Stop() -} - -func Test_newMockZookeeperClient(t *testing.T) { - ts, _, event, err := NewMockZookeeperClient("test", 15*time.Second) - assert.NoError(t, err) - defer func() { - err := ts.Stop() - assert.Nil(t, err) - }() - states := []zk.State{zk.StateConnecting, zk.StateConnected, zk.StateHasSession} - verifyEventStateOrder(t, event, states, "event channel") - -} - -func TestCreate(t *testing.T) { - ts, z, event, err := NewMockZookeeperClient("test", 15*time.Second) - assert.NoError(t, err) - defer func() { - _ = ts.Stop() - assert.Nil(t, err) - }() - err = z.Create("test1/test2/test3/test4") - assert.NoError(t, err) - - states := []zk.State{zk.StateConnecting, zk.StateConnected, zk.StateHasSession} - verifyEventStateOrder(t, event, states, "event channel") -} - -func TestCreateDelete(t *testing.T) { - ts, z, event, err := NewMockZookeeperClient("test", 15*time.Second) - assert.NoError(t, err) - defer func() { - _ = ts.Stop() - assert.Nil(t, err) - }() - - states := []zk.State{zk.StateConnecting, zk.StateConnected, zk.StateHasSession} - verifyEventStateOrder(t, event, states, "event channel") - err = z.Create("/test1/test2/test3/test4") - assert.NoError(t, err) - err = z.Delete("/test1/test2/test3/test4") - assert.NoError(t, err) - // verifyEventOrder(t, event, []zk.EventType{zk.EventNodeCreated}, "event channel") -} - -func TestRegisterTemp(t *testing.T) { - ts, z, event, err := NewMockZookeeperClient("test", 15*time.Second) - assert.NoError(t, err) - defer func() { - _ = ts.Stop() - assert.Nil(t, err) - }() - err = z.Create("/test1/test2/test3") - assert.NoError(t, err) - - tmpath, err := z.RegisterTemp("/test1/test2/test3", "test4") - assert.NoError(t, err) - assert.Equal(t, "/test1/test2/test3/test4", tmpath) - states := []zk.State{zk.StateConnecting, zk.StateConnected, zk.StateHasSession} - verifyEventStateOrder(t, event, states, "event channel") -} - -func TestRegisterTempSeq(t *testing.T) { - ts, z, event, err := NewMockZookeeperClient("test", 15*time.Second) - assert.NoError(t, err) - defer func() { - _ = ts.Stop() - assert.Nil(t, err) - }() - err = z.Create("/test1/test2/test3") - assert.NoError(t, err) - tmpath, err := z.RegisterTempSeq("/test1/test2/test3", []byte("test")) - assert.NoError(t, err) - assert.Equal(t, "/test1/test2/test3/0000000000", tmpath) - states := []zk.State{zk.StateConnecting, zk.StateConnected, zk.StateHasSession} - verifyEventStateOrder(t, event, states, "event channel") -} - -func Test_UnregisterEvent(t *testing.T) { - client := &ZookeeperClient{} - client.eventRegistry = make(map[string][]*chan struct{}) - array := []*chan struct{}{} - array = append(array, new(chan struct{})) - client.eventRegistry["test"] = array - client.UnregisterEvent("test", new(chan struct{})) -} diff --git a/remoting/zookeeper/curator_discovery/service_discovery.go b/remoting/zookeeper/curator_discovery/service_discovery.go index acd43c0b92..ebe784c353 100644 --- a/remoting/zookeeper/curator_discovery/service_discovery.go +++ b/remoting/zookeeper/curator_discovery/service_discovery.go @@ -26,6 +26,7 @@ import ( import ( "github.com/dubbogo/go-zookeeper/zk" + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" perrors "github.com/pkg/errors" ) @@ -46,7 +47,7 @@ type Entry struct { // https://github.com/apache/curator/blob/master/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/ServiceDiscovery.java // It's not exactly the same as curator-x-discovery's service discovery type ServiceDiscovery struct { - client *zookeeper.ZookeeperClient + client *gxzookeeper.ZookeeperClient mutex *sync.Mutex basePath string services *sync.Map @@ -54,7 +55,7 @@ type ServiceDiscovery struct { } // NewServiceDiscovery the constructor of service discovery -func NewServiceDiscovery(client *zookeeper.ZookeeperClient, basePath string) *ServiceDiscovery { +func NewServiceDiscovery(client *gxzookeeper.ZookeeperClient, basePath string) *ServiceDiscovery { return &ServiceDiscovery{ client: client, mutex: &sync.Mutex{}, diff --git a/remoting/zookeeper/facade.go b/remoting/zookeeper/facade.go index b2e350f00e..aeaa317ea3 100644 --- a/remoting/zookeeper/facade.go +++ b/remoting/zookeeper/facade.go @@ -21,15 +21,17 @@ import ( "sync" "time" ) - +import ( + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" +) import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/logger" ) type ZkClientFacade interface { - ZkClient() *ZookeeperClient - SetZkClient(*ZookeeperClient) + ZkClient() *gxzookeeper.ZookeeperClient + SetZkClient(*gxzookeeper.ZookeeperClient) ZkClientLock() *sync.Mutex WaitGroup() *sync.WaitGroup // for wait group control, zk client listener & zk client container Done() chan struct{} // for registry destroy diff --git a/remoting/zookeeper/facade_test.go b/remoting/zookeeper/facade_test.go index e63cd4b143..6463e57453 100644 --- a/remoting/zookeeper/facade_test.go +++ b/remoting/zookeeper/facade_test.go @@ -25,6 +25,7 @@ import ( import ( "github.com/dubbogo/go-zookeeper/zk" + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" "github.com/stretchr/testify/assert" ) @@ -33,14 +34,33 @@ import ( ) type mockFacade struct { - client *ZookeeperClient + client *gxzookeeper.ZookeeperClient cltLock sync.Mutex wg sync.WaitGroup URL *common.URL done chan struct{} } -func newMockFacade(client *ZookeeperClient, url *common.URL) ZkClientFacade { +func verifyEventStateOrder(t *testing.T, c <-chan zk.Event, expectedStates []zk.State, source string) { + for _, state := range expectedStates { + for { + event, ok := <-c + if !ok { + t.Fatalf("unexpected channel close for %s", source) + } + if event.Type != zk.EventSession { + continue + } + + if event.State != state { + t.Fatalf("mismatched state order from %s, expected %v, received %v", source, state, event.State) + } + break + } + } +} + +func newMockFacade(client *gxzookeeper.ZookeeperClient, url *common.URL) ZkClientFacade { mock := &mockFacade{ client: client, URL: url, @@ -50,11 +70,11 @@ func newMockFacade(client *ZookeeperClient, url *common.URL) ZkClientFacade { return mock } -func (r *mockFacade) ZkClient() *ZookeeperClient { +func (r *mockFacade) ZkClient() *gxzookeeper.ZookeeperClient { return r.client } -func (r *mockFacade) SetZkClient(client *ZookeeperClient) { +func (r *mockFacade) SetZkClient(client *gxzookeeper.ZookeeperClient) { r.client = client } @@ -88,7 +108,7 @@ func (r *mockFacade) IsAvailable() bool { } func Test_Facade(t *testing.T) { - ts, z, event, err := NewMockZookeeperClient("test", 15*time.Second) + ts, z, event, err := gxzookeeper.NewMockZookeeperClient("test", 15*time.Second) assert.NoError(t, err) defer func() { if err := ts.Stop(); err != nil { diff --git a/remoting/zookeeper/listener.go b/remoting/zookeeper/listener.go index d0459fd7a1..c24a4fc1f9 100644 --- a/remoting/zookeeper/listener.go +++ b/remoting/zookeeper/listener.go @@ -27,6 +27,7 @@ import ( import ( getty "github.com/apache/dubbo-getty" "github.com/dubbogo/go-zookeeper/zk" + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" perrors "github.com/pkg/errors" ) @@ -43,7 +44,7 @@ var ( // nolint type ZkEventListener struct { - client *ZookeeperClient + client *gxzookeeper.ZookeeperClient pathMapLock sync.Mutex pathMap map[string]struct{} wg sync.WaitGroup @@ -51,7 +52,7 @@ type ZkEventListener struct { } // NewZkEventListener returns a EventListener instance -func NewZkEventListener(client *ZookeeperClient) *ZkEventListener { +func NewZkEventListener(client *gxzookeeper.ZookeeperClient) *ZkEventListener { return &ZkEventListener{ client: client, pathMap: make(map[string]struct{}), @@ -60,7 +61,7 @@ func NewZkEventListener(client *ZookeeperClient) *ZkEventListener { } // nolint -func (l *ZkEventListener) SetClient(client *ZookeeperClient) { +func (l *ZkEventListener) SetClient(client *gxzookeeper.ZookeeperClient) { l.client = client } @@ -93,7 +94,7 @@ func (l *ZkEventListener) listenServiceNodeEvent(zkPath string, listener ...remo select { case zkEvent = <-keyEventCh: logger.Warnf("get a zookeeper keyEventCh{type:%s, server:%s, path:%s, state:%d-%s, err:%s}", - zkEvent.Type.String(), zkEvent.Server, zkEvent.Path, zkEvent.State, StateToString(zkEvent.State), zkEvent.Err) + zkEvent.Type.String(), zkEvent.Server, zkEvent.Path, zkEvent.State, gxzookeeper.StateToString(zkEvent.State), zkEvent.Err) switch zkEvent.Type { case zk.EventNodeDataChanged: logger.Warnf("zk.ExistW(key{%s}) = event{EventNodeDataChanged}", zkPath) @@ -304,7 +305,7 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen logger.Infof("listen dubbo service key{%s}", dubboPath) l.wg.Add(1) go func(zkPath string, listener remoting.DataListener) { - if l.listenServiceNodeEvent(zkPath) { + if l.listenServiceNodeEvent(zkPath, listener) { listener.DataChange(remoting.Event{Path: zkPath, Action: remoting.EventTypeDel}) l.pathMapLock.Lock() delete(l.pathMap, zkPath) @@ -333,7 +334,7 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen l.handleZkNodeEvent(zkPath, children, listener) case zkEvent = <-childEventCh: logger.Warnf("get a zookeeper childEventCh{type:%s, server:%s, path:%s, state:%d-%s, err:%s}", - zkEvent.Type.String(), zkEvent.Server, zkEvent.Path, zkEvent.State, StateToString(zkEvent.State), zkEvent.Err) + zkEvent.Type.String(), zkEvent.Server, zkEvent.Path, zkEvent.State, gxzookeeper.StateToString(zkEvent.State), zkEvent.Err) ticker.Stop() if zkEvent.Type != zk.EventNodeChildrenChanged { break WATCH diff --git a/remoting/zookeeper/listener_test.go b/remoting/zookeeper/listener_test.go index f56bd95c9f..12786655a7 100644 --- a/remoting/zookeeper/listener_test.go +++ b/remoting/zookeeper/listener_test.go @@ -26,6 +26,7 @@ import ( import ( "github.com/dubbogo/go-zookeeper/zk" + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" "github.com/stretchr/testify/assert" ) @@ -38,8 +39,8 @@ var ( dubboPropertiesPath = "/dubbo/dubbo.properties" ) -func initZkData(t *testing.T) (*zk.TestCluster, *ZookeeperClient, <-chan zk.Event) { - ts, client, event, err := NewMockZookeeperClient("test", 15*time.Second) +func initZkData(t *testing.T) (*zk.TestCluster, *gxzookeeper.ZookeeperClient, <-chan zk.Event) { + ts, client, event, err := gxzookeeper.NewMockZookeeperClient("test", 15*time.Second) assert.NoError(t, err) data := ` @@ -96,7 +97,7 @@ func TestListener(t *testing.T) { dubbo.service.com.ikurento.user.UserProvider.cluster=failover ` var wait sync.WaitGroup - ts, client, event := initZkData(t) + ts, client, _ := initZkData(t) defer func() { if err := ts.Stop(); err != nil { t.Errorf("ts.Stop() = error: %v", err) @@ -104,7 +105,7 @@ func TestListener(t *testing.T) { }() client.Wait.Add(1) wait.Add(1) - go client.HandleZkEvent(event) + go client.GetEventHandler().HandleZkEvent(client) listener := NewZkEventListener(client) dataListener := &mockDataListener{client: client, changedData: changedData, wait: &wait} listener.ListenServiceEvent(nil, "/dubbo", dataListener) @@ -113,12 +114,11 @@ func TestListener(t *testing.T) { assert.NoError(t, err) wait.Wait() assert.Equal(t, changedData, dataListener.eventList[1].Content) - } type mockDataListener struct { eventList []remoting.Event - client *ZookeeperClient + client *gxzookeeper.ZookeeperClient changedData string wait *sync.WaitGroup } From 0ebe79c97e23525887ecae4f02199a308103874b Mon Sep 17 00:00:00 2001 From: wangwx Date: Tue, 2 Mar 2021 20:42:56 +0800 Subject: [PATCH 29/35] fix lint --- cluster/router/tag/tag_router_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cluster/router/tag/tag_router_test.go b/cluster/router/tag/tag_router_test.go index 984f9dd62d..3b53d473fa 100644 --- a/cluster/router/tag/tag_router_test.go +++ b/cluster/router/tag/tag_router_test.go @@ -44,7 +44,6 @@ import ( "github.com/apache/dubbo-go/protocol" "github.com/apache/dubbo-go/protocol/invocation" "github.com/apache/dubbo-go/remoting" - "github.com/apache/dubbo-go/remoting/zookeeper" ) const ( From 46801c31b30b07d66eddb4a31ecec62827a4a429 Mon Sep 17 00:00:00 2001 From: wangwx Date: Tue, 2 Mar 2021 21:22:12 +0800 Subject: [PATCH 30/35] replace grpc version --- go.mod | 1 + 1 file changed, 1 insertion(+) diff --git a/go.mod b/go.mod index 9f2022d7ab..d7cd2d2c36 100644 --- a/go.mod +++ b/go.mod @@ -52,4 +52,5 @@ replace ( github.com/envoyproxy/go-control-plane => github.com/envoyproxy/go-control-plane v0.8.0 github.com/shirou/gopsutil => github.com/shirou/gopsutil v0.0.0-20181107111621-48177ef5f880 go.etcd.io/bbolt v1.3.4 => github.com/coreos/bbolt v1.3.3 + google.golang.org/grpc => google.golang.org/grpc v1.26.0 ) From 364be20da477e9eff6336de989e0567c3476165c Mon Sep 17 00:00:00 2001 From: wangwx Date: Wed, 3 Mar 2021 14:15:52 +0800 Subject: [PATCH 31/35] update gost version --- go.mod | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d7cd2d2c36..4a66eefb83 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/apache/dubbo-go-hessian2 v1.8.2 github.com/coreos/etcd v3.3.25+incompatible github.com/creasty/defaults v1.5.1 - github.com/dubbogo/go-zookeeper v1.0.2 + github.com/dubbogo/go-zookeeper v1.0.3 github.com/dubbogo/gost v1.11.0 github.com/emicklei/go-restful/v3 v3.4.0 github.com/fsnotify/fsnotify v1.4.9 @@ -24,7 +24,6 @@ require ( github.com/hashicorp/consul/api v1.5.0 github.com/hashicorp/vault/sdk v0.1.14-0.20191112033314-390e96e22eb2 github.com/jinzhu/copier v0.0.0-20190625015134-976e0346caa8 - github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect github.com/magiconair/properties v1.8.4 github.com/mitchellh/mapstructure v1.4.1 github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd @@ -48,7 +47,7 @@ require ( replace ( github.com/coreos/bbolt => go.etcd.io/bbolt v1.3.4 - github.com/dubbogo/gost => github.com/wenxuwan/gost v1.9.4-0.20210302082346-4f0dc3bef61f + github.com/dubbogo/gost => github.com/wenxuwan/gost v1.9.4-0.20210303060806-fde1b7159726 github.com/envoyproxy/go-control-plane => github.com/envoyproxy/go-control-plane v0.8.0 github.com/shirou/gopsutil => github.com/shirou/gopsutil v0.0.0-20181107111621-48177ef5f880 go.etcd.io/bbolt v1.3.4 => github.com/coreos/bbolt v1.3.3 From 786e843cd0c6109e89288b2654b71b3aebcbd54e Mon Sep 17 00:00:00 2001 From: wangwx Date: Wed, 3 Mar 2021 14:28:46 +0800 Subject: [PATCH 32/35] fix compile error --- go.sum | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/go.sum b/go.sum index b2efef1948..c00980a574 100644 --- a/go.sum +++ b/go.sum @@ -69,6 +69,7 @@ github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 h1:ygIc8M6tr github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/hcsshim v0.8.7-0.20191101173118-65519b62243c/go.mod h1:7xhjOwRV2+0HXGmM0jxaEu+ZiXJFoVZOTfL/dmqbrD8= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.0.1 h1:iLrQrdwjDd52kHDA5op2UBJFjmOb9g+7scBan4RN8F0= github.com/NYTimes/gziphandler v1.0.1/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= @@ -240,6 +241,8 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= 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/gost v1.9.0/go.mod h1:pPTjVyoJan3aPxBPNUX0ADkXjPibLo+/Ib0/fADXSG8= github.com/dubbogo/gost v1.10.1/go.mod h1:+mQGS51XQEUWZP2JeGZTxJwipjRKtJO7Tr+FOg+72rI= github.com/dubbogo/gost v1.11.0 h1:9KtyWQz1gMlAfwzen5iyhMdoe08SPBBUVhco4rdgJ9I= @@ -253,6 +256,7 @@ github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1 github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/ef-ds/deque v1.0.4-0.20190904040645-54cb57c252a1/go.mod h1:HvODWzv6Y6kBf3Ah2WzN1bHjDUezGLaAhwuWVwfpEJs= +github.com/elazarl/go-bindata-assetfs v0.0.0-20160803192304-e1a2a7ec64b0 h1:ZoRgc53qJCfSLimXqJDrmBhnt5GChDsExMCK7t48o0Y= github.com/elazarl/go-bindata-assetfs v0.0.0-20160803192304-e1a2a7ec64b0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk= github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= @@ -499,10 +503,12 @@ github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHh github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= +github.com/hashicorp/go-raftchunking v0.6.1 h1:moEnaG3gcwsWNyIBJoD5PCByE+Ewkqxh6N05CT+MbwA= github.com/hashicorp/go-raftchunking v0.6.1/go.mod h1:cGlg3JtDy7qy6c/3Bu660Mic1JF+7lWqIwCFSb08fX0= github.com/hashicorp/go-raftchunking v0.6.3-0.20191002164813-7e9e8525653a h1:FmnBDwGwlTgugDGbVxwV8UavqSMACbGrUpfc98yFLR4= github.com/hashicorp/go-raftchunking v0.6.3-0.20191002164813-7e9e8525653a/go.mod h1:xbXnmKqX9/+RhPkJ4zrEx4738HacP72aaUPlT2RZ4sU= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-retryablehttp v0.5.4 h1:1BZvpawXoJCWX6pNtow9+rpEj+3itIlutiqnntI6jOE= github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.6.2 h1:bHM2aVXwBtBJWxHtkSrWuI4umABCUczs52eiUS9nSiw= github.com/hashicorp/go-retryablehttp v0.6.2/go.mod h1:gEx6HMUGxYYhJScX7W1Il64m6cc2C1mDaW3NQ9sY1FY= @@ -553,6 +559,7 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J github.com/hashicorp/serf v0.9.0/go.mod h1:YL0HO+FifKOW2u1ke99DGVu1zhcpZzNwrLIqBC7vbYU= github.com/hashicorp/serf v0.9.2 h1:yJoyfZXo4Pk2p/M/viW+YLibBFiIbKoP79gu7kDAFP0= github.com/hashicorp/serf v0.9.2/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/vault/api v1.0.4 h1:j08Or/wryXT4AcHj1oCbMd7IijXcKzYUGw59LGu9onU= github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= github.com/hashicorp/vault/api v1.0.5-0.20191108163347-bdd38fca2cff h1:cl94LQIrs/mNbh3ny1R8lM1gtYcUBa7HnGtOCi35SlQ= github.com/hashicorp/vault/api v1.0.5-0.20191108163347-bdd38fca2cff/go.mod h1:Uf8LaHyrYsgVgHzO2tMZKhqRGlL3UJ6XaSwW2EA1Iqo= @@ -816,6 +823,7 @@ github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.2.6+incompatible h1:6aCX4/YZ9v8q69hTyiR7dNLnTA3fgtKHVVW5BCd5Znw= github.com/pierrec/lz4 v2.2.6+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -946,6 +954,7 @@ github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3 github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -1003,6 +1012,8 @@ github.com/wenxuwan/gost v1.9.4-0.20210302073456-846ce528eb63 h1:uWjgNklk3bmU9uQ github.com/wenxuwan/gost v1.9.4-0.20210302073456-846ce528eb63/go.mod h1:I1V26ofEK1+4l48D2vDkuTxW2jInvt83MqKQ3P+Sl5Y= github.com/wenxuwan/gost v1.9.4-0.20210302082346-4f0dc3bef61f h1:V5XL115SW539g25+QeASGE7vbBg4BJOf9hxkZSZhOIY= github.com/wenxuwan/gost v1.9.4-0.20210302082346-4f0dc3bef61f/go.mod h1:I1V26ofEK1+4l48D2vDkuTxW2jInvt83MqKQ3P+Sl5Y= +github.com/wenxuwan/gost v1.9.4-0.20210303060806-fde1b7159726 h1:RJ+oVEiY3g6LobTCfOxV6hDofuXAJjQvJXhjIykENOQ= +github.com/wenxuwan/gost v1.9.4-0.20210303060806-fde1b7159726/go.mod h1:3QQEj50QOhkWTERT785YZ5ZxIRGNdR11FCLP7FzHsMc= github.com/willf/bitset v1.1.10 h1:NotGKqX0KwQ72NUzqrjZq5ipPNDQex9lo3WpaS8L2sc= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= @@ -1407,6 +1418,7 @@ k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUc k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf h1:EYm5AW/UUDbnmnI+gK0TJDVK9qPLhM+sRHYanNKw0EQ= k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a h1:UcxjrRMyNx/i/y8G7kPvLyy7rfbeuf1PYyBf973pgyU= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= From 9d8c910af581c4d739c714d08cc29a6ca533158e Mon Sep 17 00:00:00 2001 From: wangwx Date: Thu, 4 Mar 2021 12:08:43 +0800 Subject: [PATCH 33/35] fix comments --- go.mod | 3 +-- go.sum | 2 ++ metadata/report/zookeeper/report.go | 1 + registry/zookeeper/registry.go | 10 ++++------ registry/zookeeper/service_discovery.go | 3 ++- remoting/exchange_client.go | 1 + 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 4a66eefb83..7d12c21e1e 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/coreos/etcd v3.3.25+incompatible github.com/creasty/defaults v1.5.1 github.com/dubbogo/go-zookeeper v1.0.3 - github.com/dubbogo/gost v1.11.0 + github.com/dubbogo/gost v1.11.2 github.com/emicklei/go-restful/v3 v3.4.0 github.com/fsnotify/fsnotify v1.4.9 github.com/go-co-op/gocron v0.1.1 @@ -47,7 +47,6 @@ require ( replace ( github.com/coreos/bbolt => go.etcd.io/bbolt v1.3.4 - github.com/dubbogo/gost => github.com/wenxuwan/gost v1.9.4-0.20210303060806-fde1b7159726 github.com/envoyproxy/go-control-plane => github.com/envoyproxy/go-control-plane v0.8.0 github.com/shirou/gopsutil => github.com/shirou/gopsutil v0.0.0-20181107111621-48177ef5f880 go.etcd.io/bbolt v1.3.4 => github.com/coreos/bbolt v1.3.3 diff --git a/go.sum b/go.sum index c00980a574..4d04f91b77 100644 --- a/go.sum +++ b/go.sum @@ -247,6 +247,8 @@ github.com/dubbogo/gost v1.9.0/go.mod h1:pPTjVyoJan3aPxBPNUX0ADkXjPibLo+/Ib0/fAD github.com/dubbogo/gost v1.10.1/go.mod h1:+mQGS51XQEUWZP2JeGZTxJwipjRKtJO7Tr+FOg+72rI= github.com/dubbogo/gost v1.11.0 h1:9KtyWQz1gMlAfwzen5iyhMdoe08SPBBUVhco4rdgJ9I= github.com/dubbogo/gost v1.11.0/go.mod h1:w8Yw29eDWtRVo3tx9nPpHkNZnOi4SRx1fZf7eVlAAU4= +github.com/dubbogo/gost v1.11.2 h1:NanyHmvzE1HrgI2T9H/jE/N1wkxFEj+IbM1A4RT9H7Q= +github.com/dubbogo/gost v1.11.2/go.mod h1:3QQEj50QOhkWTERT785YZ5ZxIRGNdR11FCLP7FzHsMc= 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= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= diff --git a/metadata/report/zookeeper/report.go b/metadata/report/zookeeper/report.go index c124279174..472f50a3eb 100644 --- a/metadata/report/zookeeper/report.go +++ b/metadata/report/zookeeper/report.go @@ -25,6 +25,7 @@ import ( import ( gxzookeeper "github.com/dubbogo/gost/database/kv/zk" ) + import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/constant" diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go index c184239363..8b21aaed73 100644 --- a/registry/zookeeper/registry.go +++ b/registry/zookeeper/registry.go @@ -130,7 +130,7 @@ func (r *zkRegistry) InitListeners() { defer oldDataListener.mutex.Unlock() r.dataListener.closed = true recovered := r.dataListener.subscribed - if recovered != nil && len(recovered) > 0 { + if len(recovered) > 0 { // recover all subscribed url for _, oldListener := range recovered { var ( @@ -295,11 +295,9 @@ func (r *zkRegistry) getCloseListener(conf *common.URL) (*RegistryConfigurationL configurationListener := r.dataListener.subscribed[conf.ServiceKey()] if configurationListener != nil { zkListener, _ = configurationListener.(*RegistryConfigurationListener) - if zkListener != nil { - if zkListener.isClosed { - r.dataListener.mutex.Unlock() - return nil, perrors.New("configListener already been closed") - } + if zkListener != nil && zkListener.isClosed { + r.dataListener.mutex.Unlock() + return nil, perrors.New("configListener already been closed") } } diff --git a/registry/zookeeper/service_discovery.go b/registry/zookeeper/service_discovery.go index 8fa36eec38..06fe0f7f24 100644 --- a/registry/zookeeper/service_discovery.go +++ b/registry/zookeeper/service_discovery.go @@ -19,14 +19,15 @@ package zookeeper import ( "fmt" - gxzookeeper "github.com/dubbogo/gost/database/kv/zk" "net/url" "strconv" "strings" "sync" ) + import ( gxset "github.com/dubbogo/gost/container/set" + gxzookeeper "github.com/dubbogo/gost/database/kv/zk" gxpage "github.com/dubbogo/gost/hash/page" perrors "github.com/pkg/errors" ) diff --git a/remoting/exchange_client.go b/remoting/exchange_client.go index 672c1ecf16..f84cef1fa8 100644 --- a/remoting/exchange_client.go +++ b/remoting/exchange_client.go @@ -24,6 +24,7 @@ import ( import ( uatomic "go.uber.org/atomic" ) + import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/logger" From 98ba75e4480a9048f74ca5142e376e9b51fba6a4 Mon Sep 17 00:00:00 2001 From: wangwx Date: Sat, 6 Mar 2021 14:55:53 +0800 Subject: [PATCH 34/35] fix comments --- registry/zookeeper/registry_test.go | 4 +--- remoting/getty/getty_client.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/registry/zookeeper/registry_test.go b/registry/zookeeper/registry_test.go index 169f5b5009..9e52dd70c3 100644 --- a/registry/zookeeper/registry_test.go +++ b/registry/zookeeper/registry_test.go @@ -38,9 +38,7 @@ func Test_Register(t *testing.T) { url, _ := common.NewURL("dubbo://127.0.0.1:20000/com.ikurento.user.UserProvider", common.WithParamsValue(constant.CLUSTER_KEY, "mock"), common.WithParamsValue("serviceid", "soa.mock"), common.WithMethods([]string{"GetUser", "AddUser"})) ts, reg, err := newMockZkRegistry(regURL) - if err != nil { - assert.NoError(t, err) - } + assert.NoError(t, err) defer func() { _ = ts.Stop() }() diff --git a/remoting/getty/getty_client.go b/remoting/getty/getty_client.go index 5029678df9..774f999e8a 100644 --- a/remoting/getty/getty_client.go +++ b/remoting/getty/getty_client.go @@ -168,7 +168,7 @@ func (c *Client) Close() { c.pool = nil c.mux.Unlock() if p != nil { - c.Close() + p.close() } } From a231789f8448c134ce0f231ffdd10f4e6833bfb5 Mon Sep 17 00:00:00 2001 From: wangwx Date: Mon, 15 Mar 2021 10:26:19 +0800 Subject: [PATCH 35/35] upgrade hession version --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 7d12c21e1e..90d1f3eaf9 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 github.com/alibaba/sentinel-golang v1.0.2 github.com/apache/dubbo-getty v1.4.3 - github.com/apache/dubbo-go-hessian2 v1.8.2 + github.com/apache/dubbo-go-hessian2 v1.9.0-rc1 github.com/coreos/etcd v3.3.25+incompatible github.com/creasty/defaults v1.5.1 github.com/dubbogo/go-zookeeper v1.0.3 diff --git a/go.sum b/go.sum index 4d04f91b77..df71d6e68f 100644 --- a/go.sum +++ b/go.sum @@ -115,6 +115,8 @@ github.com/apache/dubbo-go v1.5.5/go.mod h1:KAty5L/vcHjh3qcTfC4R5Nfd0tkk7MLJnux/ github.com/apache/dubbo-go-hessian2 v1.7.0/go.mod h1:7rEw9guWABQa6Aqb8HeZcsYPHsOS7XT1qtJvkmI6c5w= github.com/apache/dubbo-go-hessian2 v1.8.2 h1:CQq2Mmlrk6Fqmudwl9Dqps8drTrBFnmXRlzgOjj0FqA= github.com/apache/dubbo-go-hessian2 v1.8.2/go.mod h1:xQUjE7F8PX49nm80kChFvepA/AvqAZ0oh/UaB6+6pBE= +github.com/apache/dubbo-go-hessian2 v1.9.0-rc1 h1:i8B4Nie8zGTsFfk84fdZmwRMdo6QmTmMtfGRjN1E43I= +github.com/apache/dubbo-go-hessian2 v1.9.0-rc1/go.mod h1:xQUjE7F8PX49nm80kChFvepA/AvqAZ0oh/UaB6+6pBE= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA=