MCPcopy
hub / github.com/syncthing/syncthing / RemoveAndWaitChan

Method RemoveAndWaitChan

lib/model/service_map.go:115–119  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

113// value: either the return value from RemoveAndWait (possibly nil), or
114// errSvcNotFound if the service was not found.
115func (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.

Callers 2

RemoveAndWaitMethod · 0.95
ClosedMethod · 0.80

Calls 1

StopAndWaitChanMethod · 0.95

Tested by

no test coverage detected