Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SubscribeJSON (0.3 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)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Feb 06 16:57:30 GMT 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)
    	}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 51.8K 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)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 97.3K bytes
    - Viewed (2)
Back to top