MCPcopy Index your code
hub / github.com/containerd/containerd / init

Function init

plugins/services/containers/local.go:45–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43var empty = &ptypes.Empty{}
44
45func init() {
46 registry.Register(&plugin.Registration{
47 Type: plugins.ServicePlugin,
48 ID: services.ContainersService,
49 Requires: []plugin.Type{
50 plugins.EventPlugin,
51 plugins.MetadataPlugin,
52 },
53 InitFn: func(ic *plugin.InitContext) (any, error) {
54 m, err := ic.GetSingle(plugins.MetadataPlugin)
55 if err != nil {
56 return nil, err
57 }
58 ep, err := ic.GetSingle(plugins.EventPlugin)
59 if err != nil {
60 return nil, err
61 }
62
63 db := m.(*metadata.DB)
64 return &local{
65 Store: metadata.NewContainerStore(db),
66 db: db,
67 publisher: ep.(events.Publisher),
68 }, nil
69 },
70 })
71}
72
73type local struct {
74 containers.Store

Callers

nothing calls this directly

Calls 2

NewContainerStoreFunction · 0.92
RegisterMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…