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

Method event

cmd/display/tty.go:205–225  ·  cmd/display/tty.go::ttyWriter.event
(e api.Resource)

Source from the content-addressed store, hash-verified

203}
204
205func (w *ttyWriter) event(e api.Resource) {
206 // Suspend print while a build is in progress, to avoid collision with buildkit Display
207 if w.ticker != nil {
208 if e.Text == api.StatusBuilding {
209 w.ticker.Stop()
210 w.suspended = true
211 } else if w.suspended {
212 w.ticker.Reset(100 * time.Millisecond)
213 w.suspended = false
214 }
215 }
216
217 if last, ok := w.tasks[e.ID]; ok {
218 last.update(e)
219 } else {
220 t := newTask(e)
221 w.tasks[e.ID] = &t
222 w.ids = append(w.ids, e.ID)
223 }
224 w.printEvent(e)
225}
226
227func (w *ttyWriter) printEvent(e api.Resource) {
228 if w.operation != "" {

Callers 1

OnMethod · 0.95

Calls 4

printEventMethod · 0.95
newTaskFunction · 0.85
updateMethod · 0.80
StopMethod · 0.65

Tested by

no test coverage detected