code: func (c *Controller) NewNotifier(name string, threshold int, updateC <-chan []byte) (func(), error) {
  	c.mu.Lock()
  	if c.isActive(name) {
  		c.mu.Unlock()
  		return nil, fmt.Errorf("Notification service %s already exists in controller", name)
  	}
  	quitC := make(chan struct{})
  	c.notifiers[name] = &notifier{
  		bins:      make(map[string]*sendBin),
  		topic:     pss.BytesToTopic([]byte(name)),
  		threshold: threshold,
  		updateC:   updateC,
  		quitC:     quitC,
  		//contentFunc: contentFunc,
  	}
  	c.mu.Unlock()
  	go func() {
  		for {
  			select {
  			case <-quitC:
  				return
  			case data := <-updateC:
  				c.notify(name, data)
  			}
  		}
  	}()
  
  	return c.notifiers[name].removeSubscription, nil
  }
docs: // NewNotifier is used by a notification service provider to create a new notification service
  // It takes a name as identifier for the resource, a threshold indicating the granularity of the subscription address bin
  // It then starts an event loop which listens to the supplied update channel and executes notifications on channel receives
  // Fails if a notifier already is registered on the name
  //func (c *Controller) NewNotifier(name string, threshold int, contentFunc func(string) ([]byte, error)) error {