// InitWithPolicies to init Retryer with remote config
InitWithPolicies to init Retryer with remote config
// InitWithPolicies to init Retryer with remote config
func (rc *Container) InitWithPolicies(methodPolicies map[string]Policy) {
	rc.Lock()
	defer rc.Unlock()
	if rc.cliRetryer != nil {
		return
	}
	for m := range methodPolicies {
		if methodPolicies[m].Enable {
			if _, ok := rc.retryerMap.Load(m); ok {
				continue
			}
			rc.initRetryer(m, methodPolicies[m])
		}
	}
}
func ( rc * Container ) InitWithPolicies ( methodPolicies map [ string ] Policy ) { rc . Lock ( ) defer rc . Unlock ( ) if rc . cliRetryer != nil { return } for m := range methodPolicies { if methodPolicies [ m ] . Enable { if _ , ok := rc . retryerMap . Load ( m ) ; ok { continue } rc . initRetryer ( m , methodPolicies [ m ] ) } } }
InitWithPolicies to init Retryer with remote config
InitWithPolicies to init Retryer with remote config
// cliRetryer is not nil means that user setup code policy, the priority is higher than remote config // NotifyPolicyChange may happen before