- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for UntilContext (0.14 sec)
-
pilot/test/xdstest/grpc.go
recv, send time.Duration } func (w *slowClientStream) RecvMsg(m any) error { if w.recv > 0 { sleep.UntilContext(w.Context(), w.recv) log.Infof("delayed recv for %v", w.recv) } return w.ClientStream.RecvMsg(m) } func (w *slowClientStream) SendMsg(m any) error { if w.send > 0 { sleep.UntilContext(w.Context(), w.send) log.Infof("delayed send for %v", w.send) } return w.ClientStream.SendMsg(m) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 2.4K bytes - Viewed (0) -
pkg/sleep/sleep.go
// limitations under the License. package sleep import ( "context" "time" ) // UntilContext sleeps for the given duration, or until the context is complete. // Returns true if the sleep completes the full duration func UntilContext(ctx context.Context, d time.Duration) bool { return Until(ctx.Done(), d) } // Until sleeps for the given duration, or until the channel is closed.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Sep 07 14:36:37 UTC 2022 - 1.2K bytes - Viewed (0) -
pilot/pkg/util/network/ip.go
} for { select { case <-ctx.Done(): return GetPrivateIPsIfAvailable() default: addr, ok := GetPrivateIPsIfAvailable() if ok { return addr, true } sleep.UntilContext(ctx, waitInterval) } } } // GetPrivateIPsIfAvailable returns all the private IP addresses func GetPrivateIPsIfAvailable() ([]string, bool) { ok := true ipAddresses := make([]string, 0)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Dec 21 21:27:21 UTC 2023 - 6.3K bytes - Viewed (0) -
cni/pkg/nodeagent/cni-watcher.go
log.Warnf("got an event for pod %s in namespace %s not found in current pod cache, retry %d of %d", name, namespace, retries, maxStaleRetries) if !sleep.UntilContext(s.ctx, time.Duration(msInterval)*time.Millisecond) { return nil, fmt.Errorf("aborted") } } if err != nil { return nil, fmt.Errorf("failed to get pod %s/%s: %v", namespace, name, err) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 06 21:31:35 UTC 2024 - 6.7K bytes - Viewed (0)