- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for NumSubscribers (0.42 sec)
-
internal/pubsub/pubsub_test.go
if len(ps.subs) != 2 { t.Fatalf("expected 2 subscribers") } if want, got := int32(2), ps.NumSubscribers(Mask(1)); got != want { t.Fatalf("want %d subscribers, got %d", want, got) } if want, got := int32(2), ps.NumSubscribers(Mask(2)); got != want { t.Fatalf("want %d subscribers, got %d", want, got) } if want, got := int32(2), ps.NumSubscribers(Mask(1|2)); got != want { t.Fatalf("want %d subscribers, got %d", want, got) }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 5.8K bytes - Viewed (0) -
internal/pubsub/pubsub.go
func (ps *PubSub[T, M]) Subscribe(mask M, subCh chan T, doneCh <-chan struct{}, filter func(entry T) bool) error { totalSubs := atomic.AddInt32(&ps.numSubscribers, 1) if ps.maxSubscribers > 0 && totalSubs > ps.maxSubscribers { atomic.AddInt32(&ps.numSubscribers, -1) return fmt.Errorf("the limit of `%d` subscribers is reached", ps.maxSubscribers) } ps.Lock() defer ps.Unlock()
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Feb 06 16:57:30 GMT 2024 - 5.2K bytes - Viewed (0) -
internal/grid/trace.go
} const ( httpScheme = "http://" httpsScheme = "https://" ) func (c *muxClient) traceRoundtrip(ctx context.Context, t *tracer, h HandlerID, req []byte) ([]byte, error) { if t == nil || t.Publisher.NumSubscribers(t.TraceType) == 0 { return c.roundtrip(h, req) } // Following trimming is needed for consistency between outputs with other internode traces.
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Feb 02 22:54:54 GMT 2024 - 4K bytes - Viewed (0) -
cmd/http-tracer.go
} r = r.WithContext(context.WithValue(r.Context(), mcontext.ContextTraceKey, &tc)) reqStartTime := time.Now().UTC() h.ServeHTTP(respRecorder, r) reqEndTime := time.Now().UTC() if globalTrace.NumSubscribers(madmin.TraceS3|madmin.TraceInternal) == 0 { // no subscribers nothing to trace. return } tt := madmin.TraceInternal if strings.HasPrefix(tc.FuncName, "s3.") { tt = madmin.TraceS3 }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Nov 21 01:09:35 GMT 2023 - 5.9K bytes - Viewed (0) -
cmd/os-instrumented.go
FuncName: "os." + s.String(), Duration: duration, Path: path, Error: errStr, } } func updateOSMetrics(s osMetric, paths ...string) func(err error) { if globalTrace.NumSubscribers(madmin.TraceOS) == 0 { osAction := globalOSMetrics.time(s) return func(err error) { osAction() } } startTime := time.Now() return func(err error) { duration := time.Since(startTime)
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Feb 15 01:09:38 GMT 2024 - 6.3K bytes - Viewed (0) -
cmd/event-notification.go
// remove sensitive encryption entries in metadata. crypto.RemoveSensitiveEntries(args.Object.UserDefined) crypto.RemoveInternalEntries(args.Object.UserDefined) if globalHTTPListen.NumSubscribers(pubsub.MaskFromMaskable(args.EventName)) > 0 { globalHTTPListen.Publish(args.ToEvent(false)) } globalEventNotifier.Send(args)
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 7.8K bytes - Viewed (0) -
cmd/data-scanner-metric.go
duration := time.Since(startTime) atomic.AddUint64(&p.operations[s], 1) if s < scannerMetricLastRealtime { p.latency[s].add(duration) } if s > scannerMetricStartTrace && globalTrace.NumSubscribers(madmin.TraceScanner) > 0 { globalTrace.Publish(scannerTrace(s, startTime, duration, strings.Join(paths, " "), custom)) } } } // time a scanner action. // Use for s < scannerMetricLastRealtime
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Sep 25 05:15:31 GMT 2023 - 9.1K bytes - Viewed (0)