MCPcopy Create free account
hub / github.com/apache/dubbo-go / cloneRootConfigForDynamicUpdate

Function cloneRootConfigForDynamicUpdate

config/root_config.go:384–403  ·  view source on GitHub ↗
(rc *RootConfig)

Source from the content-addressed store, hash-verified

382}
383
384func cloneRootConfigForDynamicUpdate(rc *RootConfig) *RootConfig {
385 next := *rc
386 if rc.Registries != nil {
387 next.Registries = make(map[string]*RegistryConfig, len(rc.Registries))
388 for registryID, registryConfig := range rc.Registries {
389 if registryConfig == nil {
390 next.Registries[registryID] = nil
391 continue
392 }
393 registryCopy := *registryConfig
394 next.Registries[registryID] = &registryCopy
395 }
396 }
397
398 if rc.Consumer != nil {
399 consumerCopy := *rc.Consumer
400 next.Consumer = &consumerCopy
401 }
402 return &next
403}
404
405// TODO:When config is migrated later, the impact of this will be migrated to the global module
406// validateRegistryAddresses Checks whether there are duplicate registry addresses

Callers 1

ProcessMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected