RemoveAndWaitChan removes the service at the given key, stopping it on the supervisor. The returned channel will produce precisely one error value: either the return value from RemoveAndWait (possibly nil), or errSvcNotFound if the service was not found.
(k K, timeout time.Duration)
| 113 | // value: either the return value from RemoveAndWait (possibly nil), or |
| 114 | // errSvcNotFound if the service was not found. |
| 115 | func (s *serviceMap[K, S]) RemoveAndWaitChan(k K, timeout time.Duration) <-chan error { |
| 116 | ret := s.StopAndWaitChan(k, timeout) |
| 117 | delete(s.services, k) |
| 118 | return ret |
| 119 | } |
| 120 | |
| 121 | // Each calls the given function for each service in the map. An error from |
| 122 | // fn will stop the iteration and be returned as-is. |
no test coverage detected