code: func (s *Server) send() error {
  	failures := 0
  	for {
  		err := s.sendBatch(s.batch)
  		if err == nil {
  			break
  		}
  
  		failures++
  		log.Errorf("Send failed %d times: %v", failures, err)
  		if failures >= s.config.MaxFailures {
  			return fmt.Errorf("send: %d errors, giving up", failures)
  		}
  
  		time.Sleep(s.config.RetryDelay)
  	}
  
  	s.batch = s.batch[:0]
  	return nil
  }
docs: // send sends a batch of notifications to the Seesaw Engine, retrying on any
  // error and giving up after MaxFailures.