MCPcopy
hub / github.com/containerd/containerd / Publisher

Method Publisher

core/metadata/db.go:288–298  ·  view source on GitHub ↗

Publisher returns an event publisher if one is configured and the current context is not inside a transaction.

(ctx context.Context)

Source from the content-addressed store, hash-verified

286// Publisher returns an event publisher if one is configured
287// and the current context is not inside a transaction.
288func (m *DB) Publisher(ctx context.Context) events.Publisher {
289 _, ok := boltutil.Transaction(ctx)
290 if ok {
291 // Do no publish events within a transaction
292 return nil
293 }
294 if m.dbopts.publisher != nil {
295 return m.dbopts.publisher
296 }
297 return nil
298}
299
300// RegisterMutationCallback registers a function to be called after a metadata
301// mutations has been performed.

Callers 8

DeleteMethod · 0.80
CommitMethod · 0.80
PrepareMethod · 0.80
CommitMethod · 0.80
RemoveMethod · 0.80
CreateMethod · 0.80
UpdateMethod · 0.80
DeleteMethod · 0.80

Calls 1

TransactionFunction · 0.92

Tested by

no test coverage detected