Discover Packages 
           
        
          
            github.com/memoio/minio 
           
        
          
            internal 
           
        
        
          
            pubsub
           
          
            
               
             
          
        
       
     
   
  
    
  
    
       
     
    
    
      package 
    
    
      
        
           
         
      
    
   
    
      
  
    
      
  
    
      Version:  
        v0.2.2
     
    
      Opens a new window with list of versions in this module.
    
    
    
   
      
  
    Published: Mar 29, 2022
   
      
  
    License: AGPL-3.0 
      
    
   
  
    Opens a new window with license information.
  
      
        
  
    
      Imports:  2
     
   
  
    Opens a new window with list of imports.
  
        
  
    
       Imported by:  0
     
   
  
    Opens a new window with list of known importers.
  
      
    
   
  
  
    
   
 
    
      
    
    
  
  
    
      
        
          Documentation 
        
       
     
  
 
    
  
    
      
      
        
          
  
    
       
      Documentation
      ¶ 
     
    
  
    
  
    
      
        
 
  
  
  
  
  
  
  
      
  
  
    
    
    
  PubSub holds publishers and subscribers
    
  
  
    
    
    
  New inits a PubSub system
  
   
    
  
  
    
    
    
  NumSubscribers returns the number of current subscribers
  
   
    
  
  
    
    
    
      func (ps *PubSub ) Publish(item interface{}) 
     
  Publish message to the subscribers.
Note that publish is always nob-blocking send so that we don't block on slow receivers.
Hence receivers should use buffered channel so as not to miss the published events.
  
   
    
  
  
    
    
    
      func (ps *PubSub ) Subscribe(subCh chan interface{}, doneCh <-chan struct{}, filter func(entry interface{}) bool ) 
     
  Subscribe - Adds a subscriber to pubsub system
  
   
  
       
      
     
   
        
      
      
        
  
    
       
      Source Files
      ¶ 
     
   
      
      
     
   
   Click to show internal directories. 
   Click to hide internal directories.