MCPcopy
hub / github.com/docker/compose / consumeEventsInBackground

Method consumeEventsInBackground

pkg/watch/notify_test.go:560–580  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

558}
559
560func (f *notifyFixture) consumeEventsInBackground(ctx context.Context) chan error {
561 done := make(chan error)
562 go func() {
563 for {
564 select {
565 case <-f.ctx.Done():
566 close(done)
567 return
568 case <-ctx.Done():
569 close(done)
570 return
571 case err := <-f.notify.Errors():
572 done <- err
573 close(done)
574 return
575 case <-f.notify.Events():
576 }
577 }
578 }()
579 return done
580}
581
582func (f *notifyFixture) fsync() {
583 f.fsyncWithRetryCount(3)

Callers 1

TestGitBranchSwitchFunction · 0.80

Calls 3

DoneMethod · 0.65
ErrorsMethod · 0.65
EventsMethod · 0.65

Tested by

no test coverage detected