diff --git a/go.mod b/go.mod index d1ee5568db0c134ef021a69d18af06f680c20af6..a815bc2af4197856c1f35a824c8958cb064dd0ab 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/creasty/defaults v1.3.0 github.com/dubbogo/getty v1.3.2 github.com/dubbogo/go-zookeeper v1.0.0 - github.com/dubbogo/gost v1.5.2 + github.com/dubbogo/gost v1.7.0 github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 // indirect github.com/go-errors/errors v1.0.1 // indirect github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect @@ -56,6 +56,4 @@ require ( gopkg.in/yaml.v2 v2.2.2 ) -replace github.com/dubbogo/gost => /Users/mindeng/git/apache-dubbo/gost - go 1.13 diff --git a/go.sum b/go.sum index 0461f29653568944637306d65a6addbd79df664f..31d15259fdd4ba0cb9cb746c112b6e61dd3e620e 100644 --- a/go.sum +++ b/go.sum @@ -110,6 +110,8 @@ github.com/dubbogo/gost v1.5.1 h1:oG5dzaWf1KYynBaBoUIOkgT+YD0niHV6xxI0Odq7hDg= github.com/dubbogo/gost v1.5.1/go.mod h1:pPTjVyoJan3aPxBPNUX0ADkXjPibLo+/Ib0/fADXSG8= github.com/dubbogo/gost v1.5.2 h1:ri/03971hdpnn3QeCU+4UZgnRNGDXLDGDucR/iozZm8= github.com/dubbogo/gost v1.5.2/go.mod h1:pPTjVyoJan3aPxBPNUX0ADkXjPibLo+/Ib0/fADXSG8= +github.com/dubbogo/gost v1.7.0 h1:lWNBIE2hk1Aj2be2uXkyRTpZG0RQZj0/xbXnkIq6EHE= +github.com/dubbogo/gost v1.7.0/go.mod h1:pPTjVyoJan3aPxBPNUX0ADkXjPibLo+/Ib0/fADXSG8= github.com/duosecurity/duo_api_golang v0.0.0-20190308151101-6c680f768e74 h1:2MIhn2R6oXQbgW5yHfS+d6YqyMfXiu2L55rFZC4UD/M= github.com/duosecurity/duo_api_golang v0.0.0-20190308151101-6c680f768e74/go.mod h1:UqXY1lYT/ERa4OEAywUqdok1T4RCRdArkhic1Opuavo= github.com/elazarl/go-bindata-assetfs v0.0.0-20160803192304-e1a2a7ec64b0 h1:ZoRgc53qJCfSLimXqJDrmBhnt5GChDsExMCK7t48o0Y= diff --git a/registry/event_listener.go b/registry/event_listener.go index 4bfec5d841d1c8b975d9fa9639029bc3bdf71d2c..810420319b8cb83edeb82203142d7207a5a6bb6b 100644 --- a/registry/event_listener.go +++ b/registry/event_listener.go @@ -24,7 +24,7 @@ import ( // EventListener is an new interface used to align with dubbo 2.7.5 // It contains the Prioritized means that the listener has its priority type EventListener interface { - gxsort.Prioritized + gxsort.Prioritizer // OnEvent handle this event OnEvent(e Event) error } @@ -38,5 +38,4 @@ type ConditionalEventListener interface { // TODO (implement ConditionalEventListener) type ServiceInstancesChangedListener struct { - } diff --git a/registry/service_discovery.go b/registry/service_discovery.go index 11b059c389643b7fa648cf5fde14e2e57a3c11b0..5577f52930c7639afca851f7390779ff6e690c6e 100644 --- a/registry/service_discovery.go +++ b/registry/service_discovery.go @@ -31,7 +31,6 @@ import ( ) type ServiceDiscovery interface { - fmt.Stringer // ----------------- lifecycle ------------------- @@ -44,7 +43,6 @@ type ServiceDiscovery interface { // If the discovery cannot be destroy, it will return an error. Destroy() error - // ----------------- registration ---------------- // Register will register an instance of ServiceInstance to registry @@ -56,7 +54,6 @@ type ServiceDiscovery interface { // Unregister will unregister this instance from registry Unregister(instance ServiceInstance) error - // ----------------- discovery ------------------- // GetDefaultPageSize will return the default page size GetDefaultPageSize() int @@ -79,7 +76,6 @@ type ServiceDiscovery interface { // Batch get all instances by the specified service names GetRequestInstances(serviceNames []string, offset int, requestedSize int) map[string]gxpage.Pager - // ----------------- event ---------------------- // AddListener adds a new ServiceInstancesChangedListener AddListener(listener *ServiceInstancesChangedListener) error