- Sort Score
- Result 10 results
- Languages All
Results 161 - 170 of 441 for ctx (0.04 sec)
-
internal/logger/target/kafka/kafka.go
if h.logCh == nil { // We are closing... return nil } select { case h.logCh <- entry: case <-ctx.Done(): // return error only for context timedout. if errors.Is(ctx.Err(), context.DeadlineExceeded) { return ctx.Err() } return nil default: // log channel is full, do not wait and return // an error immediately to the caller atomic.AddInt64(&h.totalMessages, 1)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 10.2K bytes - Viewed (0) -
istioctl/pkg/checkinject/checkinject.go
} return nil }, RunE: func(cmd *cobra.Command, args []string) error { kubeClient, err := ctx.CLIClient() if err != nil { return err } var podName, podNs string var podLabels, nsLabels map[string]string if len(args) == 1 { podName, podNs, err = ctx.InferPodInfoFromTypedResource(args[0], ctx.Namespace()) if err != nil { return err }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Sat Apr 13 05:23:38 UTC 2024 - 9.3K bytes - Viewed (0) -
tests/serializer_test.go
switch value := dbValue.(type) { case []byte: err = field.Set(ctx, dst, bytes.TrimPrefix(value, c.prefix)) case string: err = field.Set(ctx, dst, strings.TrimPrefix(value, string(c.prefix))) default: err = fmt.Errorf("unsupported data %#v", dbValue) } return err } func (c *CustomSerializer) Value(ctx context.Context, field *schema.Field, dst reflect.Value, fieldValue interface{}) (interface{}, error) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Apr 21 14:09:38 UTC 2023 - 7.6K bytes - Viewed (0) -
cmd/bucket-replication-handlers.go
return } // Check if bucket exists. if _, err := objectAPI.GetBucketInfo(ctx, bucket, BucketOptions{}); err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } if _, _, err := globalBucketMetadataSys.GetReplicationConfig(ctx, bucket); err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 12:04:40 UTC 2024 - 23.3K bytes - Viewed (0) -
cmd/metrics-v3-cluster-usage.go
) // loadClusterUsageObjectMetrics - reads cluster usage metrics. // // This is a `MetricsLoaderFn`. func loadClusterUsageObjectMetrics(ctx context.Context, m MetricValues, c *metricsCache) error { dataUsageInfo, err := c.dataUsageInfo.Get() if err != nil { metricsLogIf(ctx, err) return nil } // data usage has not captured any data yet. if dataUsageInfo.LastUpdate.IsZero() { return nil } var (
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jul 14 18:11:42 UTC 2024 - 6.5K bytes - Viewed (0) -
cmd/utils.go
// sleepContext sleeps for d duration or until ctx is done. func sleepContext(ctx context.Context, d time.Duration) error { select { case <-ctx.Done(): return ctx.Err() case <-time.After(d): } return nil } // helper type to return either item or error. type itemOrErr[V any] struct { Item V Err error } func filterStorageClass(ctx context.Context, s string) string {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Aug 13 22:22:04 UTC 2024 - 31.9K bytes - Viewed (0) -
internal/logger/reqinfo.go
// SetReqInfo sets ReqInfo in the context. func SetReqInfo(ctx context.Context, req *ReqInfo) context.Context { if ctx == nil { LogIf(context.Background(), "", fmt.Errorf("context is nil")) return nil } return context.WithValue(ctx, contextLogKey, req) } // GetReqInfo returns ReqInfo if set. func GetReqInfo(ctx context.Context) *ReqInfo { if ctx != nil { r, ok := ctx.Value(contextLogKey).(*ReqInfo) if ok {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Aug 13 22:22:04 UTC 2024 - 4.4K bytes - Viewed (0) -
internal/dsync/dsync-client_test.go
} } func (restClient *ReconnectRESTClient) RLock(ctx context.Context, args LockArgs) (status bool, err error) { return restClient.Call("/v1/rlock", args) } func (restClient *ReconnectRESTClient) Lock(ctx context.Context, args LockArgs) (status bool, err error) { return restClient.Call("/v1/lock", args) } func (restClient *ReconnectRESTClient) RUnlock(ctx context.Context, args LockArgs) (status bool, err error) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 20 17:36:09 UTC 2022 - 4.4K bytes - Viewed (0) -
cmd/object-multipart-handlers.go
} } writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } defer gr.Close() srcInfo := gr.ObjInfo actualPartSize, err := srcInfo.GetActualSize() if err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } if err := enforceBucketQuotaHard(ctx, dstBucket, actualPartSize); err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Aug 31 18:25:48 UTC 2024 - 39.2K bytes - Viewed (0) -
internal/grid/benchmark_test.go
// Send 10x response. Handle: func(ctx context.Context, payload []byte, _ <-chan []byte, out chan<- []byte) *RemoteErr { for i := 0; i < responses; i++ { toSend := GetByteBuffer()[:0] toSend = append(toSend, byte(i)) toSend = append(toSend, payload...) select { case <-ctx.Done(): return nil case out <- toSend: } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.7K bytes - Viewed (0)