code: func (rs *retryingSink) write(events ...Event) error {
  	if err := rs.sink.Write(events...); err != nil {
  		rs.failure()
  		return err
  	}
  
  	rs.reset()
  	return nil
  }
docs: // write provides a helper that dispatches failure and success properly. Used
  // by write as the single-flight write call.