- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for NumSubscribers (0.31 sec)
-
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()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 06 16:57:30 UTC 2024 - 5.2K bytes - Viewed (0) -
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) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 5.8K 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)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 21 22:22:24 UTC 2024 - 7.7K 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.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Jun 01 05:17:37 UTC 2024 - 4.1K bytes - Viewed (0) -
cmd/batch-handlers.go
return func(info objTraceInfoer, err error) { duration := time.Since(startTime) if globalTrace.NumSubscribers(madmin.TraceBatch) > 0 { globalTrace.Publish(batchJobTrace(d, job, startTime, duration, info, attempts, err)) return } switch d { case batchJobMetricReplication: if globalTrace.NumSubscribers(madmin.TraceBatchReplication) > 0 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 18 15:32:09 UTC 2024 - 62.2K 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 }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 24 17:13:00 UTC 2024 - 6K 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)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 15 01:09:38 UTC 2024 - 6.3K 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
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 25 05:15:31 UTC 2023 - 9.1K bytes - Viewed (0) -
cmd/erasure-healing.go
storageDisks := er.getDisks() storageEndpoints := er.getEndpoints() defer func() { er.auditHealObject(ctx, bucket, object, versionID, result, err) }() if globalTrace.NumSubscribers(madmin.TraceHealing) > 0 { startTime := time.Now() defer func() { healTrace(healingMetricObject, startTime, bucket, object, &opts, err, &result) }() } // Initialize heal result object
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Oct 02 17:50:41 UTC 2024 - 34.4K bytes - Viewed (0) -
cmd/server-main.go
} globalBootstrapTracer.Record(info) if serverDebugLog { fmt.Println(time.Now().Round(time.Millisecond).Format(time.RFC3339), " bootstrap: ", msg) } noSubs := globalTrace.NumSubscribers(madmin.TraceBootstrap) == 0 if noSubs { return } globalTrace.Publish(info) } func bootstrapTrace(msg string, worker func()) { if serverDebugLog {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 24 21:50:11 UTC 2024 - 35.2K bytes - Viewed (1)