MCPcopy Create free account
hub / github.com/containerd/containerd / init

Function init

core/runtime/v2/example/example.go:37–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35)
36
37func init() {
38 registry.Register(&plugin.Registration{
39 Type: plugins.TTRPCPlugin,
40 ID: "task",
41 Requires: []plugin.Type{
42 plugins.EventPlugin,
43 plugins.InternalPlugin,
44 },
45 InitFn: func(ic *plugin.InitContext) (any, error) {
46 pp, err := ic.GetByID(plugins.EventPlugin, "publisher")
47 if err != nil {
48 return nil, err
49 }
50 ss, err := ic.GetByID(plugins.InternalPlugin, "shutdown")
51 if err != nil {
52 return nil, err
53 }
54 return newTaskService(ic.Context, pp.(shim.Publisher), ss.(shutdown.Service))
55 },
56 })
57}
58
59func NewManager(name string) shim.Shim {
60 return manager{name: name}

Callers

nothing calls this directly

Calls 2

newTaskServiceFunction · 0.85
RegisterMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…