MCPcopy Create free account
hub / github.com/containers/common / writeEvent

Method writeEvent

libimage/events.go:51–62  ·  view source on GitHub ↗

writeEvent writes the specified event to the Runtime's event channel. The event is discarded if no event channel has been registered (yet).

(event *Event)

Source from the content-addressed store, hash-verified

49// writeEvent writes the specified event to the Runtime's event channel. The
50// event is discarded if no event channel has been registered (yet).
51func (r *Runtime) writeEvent(event *Event) {
52 select {
53 case r.eventChannel <- event:
54 // Done
55 case <-time.After(2 * time.Second):
56 // The Runtime's event channel has a buffer of size 100 which
57 // should be enough even under high load. However, we
58 // shouldn't block too long in case the buffer runs full (could
59 // be an honest user error or bug).
60 logrus.Warnf("Discarding libimage event which was not read within 2 seconds: %v", event)
61 }
62}

Callers 11

PushMethod · 0.95
PullMethod · 0.95
saveSingleImageMethod · 0.95
saveDockerArchiveMethod · 0.95
LoadMethod · 0.95
removeRecursiveMethod · 0.80
TagMethod · 0.80
UntagMethod · 0.80
MountMethod · 0.80
UnmountMethod · 0.80
PushMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected