code: func NewNotifier(ec *EngineConfig) (*Notifier, error) {
  	outgoing := make(chan Notification, 1)
  	n := &Notifier{
  		C:         outgoing,
  		outgoing:  outgoing,
  		reload:    make(chan bool, 1),
  		shutdown:  make(chan bool, 1),
  		engineCfg: ec,
  		source:    SourcePeer,
  	}
  
  	note, err := n.bootstrap()
  	if err != nil {
  		return nil, err
  	}
  
  	// If the on disk configuration is different, update it.
  	if note.Source != SourceDisk {
  		dNote, _ := n.pullConfig(SourceDisk)
  		if dNote == nil || !dNote.Cluster.Equal(note.Cluster) {
  			if err := saveConfig(note.protobuf, n.engineCfg.ClusterFile, true); err != nil {
  				log.Warningf("Failed to save config to %s: %v", n.engineCfg.ClusterFile, err)
  			}
  		}
  	}
  
  	n.last = note
  	n.outgoing <- *note
  
  	go n.run()
  	return n, nil
  }
docs: // NewNotifier creates a new Notifier.