Subscribes to dynamic-config updates with information about the current and previous states.
Subscribes to dynamic-config updates using a member function, named OnConfigUpdate by convention. Also constructs dynamic_config::Diff object using std::nullopt and current config snapshot, then immediately invokes the function with it (this invocation will be executed synchronously).
the subscriber, which is the owner of the listener method, and is also used as the unique identifier of the subscription
name
the name of the subscriber, for diagnostic purposes
func
the listener method, named OnConfigUpdate by convention.
Returns
a concurrent::AsyncEventSubscriberScope controlling the subscription, which should be stored as a member in the subscriber; Unsubscribe should be called explicitly
Subscribes to dynamic-config updates using a member function. Also immediately invokes the function with the current config snapshot (this invocation will be executed synchronously).
the subscriber, which is the owner of the listener method, and is also used as the unique identifier of the subscription
name
the name of the subscriber, for diagnostic purposes
func
the listener method, named OnConfigUpdate by convention.
Returns
a concurrent::AsyncEventSubscriberScope controlling the subscription, which should be stored as a member in the subscriber; Unsubscribe should be called explicitly
Subscribes to dynamic-config updates using a member function, named OnConfigUpdate by convention. The function will be invoked if at least one of the configs has been changed since the previous invocation. So at the first time immediately invokes the function with the current config snapshot (this invocation will be executed synchronously).
a concurrent::AsyncEventSubscriberScope controlling the subscription, which should be stored as a member in the subscriber; Unsubscribe should be called explicitly