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

Method Start

pkg/compose/watch.go:84–100  ·  pkg/compose/watch.go::Watcher.Start
(ctx context.Context)

Source from the content-addressed store, hash-verified

82var mx gsync.Mutex
83
84func (w *Watcher) Start(ctx context.Context) error {
85 mx.Lock()
86 defer mx.Unlock()
87 ctx, cancelFunc := context.WithCancel(ctx)
88 w.stopFn = cancelFunc
89 wait, err := w.watchFn(ctx, w.project, w.options)
90 if err != nil {
91 go func() {
92 w.errCh <- err
93 }()
94 return err
95 }
96 go func() {
97 w.errCh <- wait()
98 }()
99 return nil
100}
101
102func (w *Watcher) Stop() error {
103 mx.Lock()

Callers 2

UpMethod · 0.95
watchMethod · 0.95

Calls 1

LockMethod · 0.45

Tested by

no test coverage detected