// WaitForBinding waits for the instance to complete the current operation (or fail).
WaitForBinding waits for the instance to complete the current operation (or fail).
// WaitForBinding waits for the instance to complete the current operation ( or fail ) .
func (sdk *SDK) WaitForBinding(ns, name string, interval time.Duration, timeout *time.Duration) (binding *v1beta1.ServiceBinding, err error) {
	if timeout == nil {
		notimeout := time.Duration(math.MaxInt64)
		timeout = &notimeout
	}
	err = wait.PollImmediate(interval, *timeout,
		func() (bool, error) {
			binding, err = sdk.RetrieveBinding(ns, name)
			if err != nil {
				return true, err
			}
			if len(binding.Status.Conditions) == 0 {
				return false, nil
			}
			isDone := (sdk.IsBindingReady(binding) || sdk.IsBindingFailed(binding)) && !binding.Status.AsyncOpInProgress
			return isDone, nil
		},
	)
	return binding, err
}
func ( sdk * SDK ) WaitForBinding ( ns , name string , interval time . Duration , timeout * time . Duration ) ( binding * v1beta1 . ServiceBinding , err error ) { if timeout == nil { notimeout := time . Duration ( math . MaxInt64 ) timeout = & notimeout } err = wait . PollImmediate ( interval , * timeout , func ( ) ( bool , error ) { binding , err = sdk . RetrieveBinding ( ns , name ) if err != nil { return true , err } if len ( binding . Status . Conditions ) == 0 { return false , nil } isDone := ( sdk . IsBindingReady ( binding ) || sdk . IsBindingFailed ( binding ) ) && ! binding . Status . AsyncOpInProgress return isDone , nil } , ) return binding , err }
WaitForBinding waits for the instance to complete the current operation (or fail).
WaitForBinding waits for the instance to complete the current operation ( or fail ) .