code: func Resubscribe(backoffMax time.Duration, fn ResubscribeFunc) Subscription {
  	s := &resubscribeSub{
  		waitTime:   backoffMax / 10,
  		backoffMax: backoffMax,
  		fn:         fn,
  		err:        make(chan error),
  		unsub:      make(chan struct{}),
  	}
  	go s.loop()
  	return s
  }
docs: // Resubscribe calls fn repeatedly to keep a subscription established. When the
  // subscription is established, Resubscribe waits for it to fail and calls fn again. This
  // process repeats until Unsubscribe is called or the active subscription ends
  // successfully.
  //
  // Resubscribe applies backoff between calls to fn. The time between calls is adapted
  // based on the error rate, but will never exceed backoffMax.