Skip to content

Commit

Permalink
Rft: keep the name of protocol registry plugin consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
yang20150702 committed Sep 13, 2022
1 parent 33a2901 commit db78644
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/config_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func registerServiceInstance() {
if err != nil {
panic(err)
}
p := extension.GetProtocol(constant.RegistryKey)
p := extension.GetProtocol(constant.RegistryProtocol)
var rp registry.RegistryFactory
var ok bool
if rp, ok = p.(registry.RegistryFactory); !ok {
Expand Down
2 changes: 1 addition & 1 deletion config/graceful_shutdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func BeforeShutdown() {

func destroyAllRegistries() {
logger.Info("Graceful shutdown --- Destroy all registriesConfig. ")
registryProtocol := extension.GetProtocol(constant.RegistryKey)
registryProtocol := extension.GetProtocol(constant.RegistryProtocol)
registryProtocol.Destroy()
}

Expand Down
2 changes: 1 addition & 1 deletion config/service_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func (s *ServiceConfig) Export() error {
s.cacheMutex.Lock()
if s.cacheProtocol == nil {
logger.Debugf(fmt.Sprintf("First load the registry protocol, url is {%v}!", ivkURL))
s.cacheProtocol = extension.GetProtocol("registry")
s.cacheProtocol = extension.GetProtocol(constant.RegistryProtocol)
}
s.cacheMutex.Unlock()

Expand Down
2 changes: 1 addition & 1 deletion registry/protocol/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type registryProtocol struct {
}

func init() {
extension.SetProtocol("registry", GetProtocol)
extension.SetProtocol(constant.RegistryProtocol, GetProtocol)
}

func newRegistryProtocol() *registryProtocol {
Expand Down

0 comments on commit db78644

Please sign in to comment.