()
| 35 | ) |
| 36 | |
| 37 | func 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 | |
| 59 | func NewManager(name string) shim.Shim { |
| 60 | return manager{name: name} |
nothing calls this directly
no test coverage detected
searching dependent graphs…