Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rft: keep the name of protocol registry plugin consistent #2052

Merged
merged 1 commit into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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