code: func (s *Server) manager() {
  	checkTicker := time.NewTicker(50 * time.Millisecond)
  	notifyTicker := time.NewTicker(s.config.NotifyInterval)
  	for {
  		select {
  		case configs := <-s.configs:
  
  			// Remove healthchecks that have been deleted.
  			for id, hc := range s.healthchecks {
  				if configs[id] == nil {
  					hc.Stop()
  					delete(s.healthchecks, id)
  				}
  			}
  
  			// Spawn new healthchecks.
  			for id := range configs {
  				if s.healthchecks[id] == nil {
  					hc := NewCheck(s.notify)
  					s.healthchecks[id] = hc
  					go hc.Run(checkTicker.C)
  				}
  			}
  
  			// Update configurations.
  			for id, hc := range s.healthchecks {
  				hc.Update(configs[id])
  			}
  		case <-notifyTicker.C:
  			// Send status notifications for all healthchecks.
  			for _, hc := range s.healthchecks {
  				hc.Notify()
  			}
  		}
  	}
  }
docs: // manager is responsible for controlling the healthchecks that are currently
  // running. When healthcheck configurations become available, the manager will
  // stop and remove deleted healthchecks, spawn new healthchecks and provide
  // the current configurations to each of the running healthchecks.