Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SubscribeJSON (0.14 sec)

  1. internal/pubsub/pubsub.go

    			}
    		}
    		atomic.StoreUint64(&ps.types, uint64(remainTypes))
    		atomic.AddInt32(&ps.numSubscribers, -1)
    	}()
    
    	return nil
    }
    
    // SubscribeJSON - Adds a subscriber to pubsub system and returns results with JSON encoding.
    func (ps *PubSub[T, M]) SubscribeJSON(mask M, subCh chan<- []byte, doneCh <-chan struct{}, filter func(entry T) bool, wg *sync.WaitGroup) error {
    	totalSubs := atomic.AddInt32(&ps.numSubscribers, 1)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Feb 06 16:57:30 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  2. cmd/peer-rest-server.go

    	}
    	var wg sync.WaitGroup
    
    	// Trace Publisher uses nonblocking publish and hence does not wait for slow subscribers.
    	// Use buffered channel to take care of burst sends or slow w.Write()
    	err = globalTrace.SubscribeJSON(traceOpts.TraceTypes(), out, ctx.Done(), func(entry madmin.TraceInfo) bool {
    		return shouldTrace(entry, traceOpts)
    	}, &wg)
    	if err != nil {
    		return grid.NewRemoteErr(err)
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 04 11:32:32 UTC 2024
    - 53.2K bytes
    - Viewed (0)
  3. cmd/admin-handlers.go

    	// Keep 100k buffered channel.
    	// If receiver cannot keep up with that we drop events.
    	traceCh := make(chan []byte, 100000)
    	peers, _ := newPeerRestClients(globalEndpoints)
    	err = globalTrace.SubscribeJSON(traceOpts.TraceTypes(), traceCh, ctx.Done(), func(entry madmin.TraceInfo) bool {
    		return shouldTrace(entry, traceOpts)
    	}, nil)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 04 11:32:32 UTC 2024
    - 99.7K bytes
    - Viewed (0)
Back to top