Skip to content
Snippets Groups Projects
Commit 628811bf authored by 邹毅贤's avatar 邹毅贤
Browse files

fix comment

parent b33bb519
No related branches found
No related tags found
No related merge requests found
......@@ -27,8 +27,7 @@ import (
// ConfigurationListener for changing listener's event
type ConfigurationListener interface {
// Process is Listener callback method. Listener gets notified by this method once there's any change happens on the config
// the listener listens on.
// Process notified once there's any change happens on the config
Process(*ConfigChangeEvent)
}
......
......@@ -416,8 +416,7 @@ func newProviderConfigurationListener(overrideListeners *sync.Map) *providerConf
return listener
}
// Process is Listener callback method. Listener gets notified by this method once there's any change happens on the config
// the listener listens on.
// Process notified once there's any change happens on the provider config
func (listener *providerConfigurationListener) Process(event *config_center.ConfigChangeEvent) {
listener.BaseConfigurationListener.Process(event)
listener.overrideListeners.Range(func(key, value interface{}) bool {
......@@ -442,8 +441,7 @@ func newServiceConfigurationListener(overrideListener *overrideSubscribeListener
return listener
}
// Process is Listener callback method. Listener gets notified by this method once there's any change happens on the config
// the listener listens on.
// Process notified once there's any change happens on the service config
func (listener *serviceConfigurationListener) Process(event *config_center.ConfigChangeEvent) {
listener.BaseConfigurationListener.Process(event)
listener.overrideListener.doOverrideIfNecessary()
......
......@@ -47,12 +47,7 @@ type Registry interface {
// NotifyListener is used for triggered when a service change notification is received.
type NotifyListener interface {
// Notify needs to support the contract: <br>
// 1. Always notifications on the service interface and the dimension of the data type. that is, won't notify part of the same type data belonging to one service. Users do not need to compare the results of the previous notification.<br>
// 2. The first notification at a subscription must be a full notification of all types of data of a service.<br>
// 3. At the time of change, different types of data are allowed to be notified separately, e.g.: providers, consumers, routers, overrides. It allows only one of these types to be notified, but the data of this type must be full, not incremental.<br>
// 4. If a data type is empty, need to notify a empty protocol with category parameter identification of url data.<br>
// 5. The order of notifications to be guaranteed by the notifications(That is, the implementation of the registry). Such as: single thread push, queue serialization, and version comparison.<br>
// Notify supports notifications on the service interface and the dimension of the data type.
Notify(*ServiceEvent)
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment