// NewRetryer build a retryer with policy
NewRetryer build a retryer with policy
// NewRetryer build a retryer with policy
func NewRetryer(p Policy, cbC *cbContainer, logger klog.FormatLogger) (retryer Retryer, err error) {
	if !p.Enable {
		return nil, nil
	}
	if p.Type == BackupType {
		retryer, err = newBackupRetryer(p, cbC, logger)
	} else {
		retryer, err = newFailureRetryer(p, cbC, logger)
	}
	return
}
func NewRetryer ( p Policy , cbC * cbContainer , logger klog . FormatLogger ) ( retryer Retryer , err error ) { if ! p . Enable { return nil , nil } if p . Type == BackupType { retryer , err = newBackupRetryer ( p , cbC , logger ) } else { retryer , err = newFailureRetryer ( p , cbC , logger ) } return }
NewRetryer build a retryer with policy
NewRetryer build a retryer with policy
// just one retry policy can be enabled at same time