()
| 43 | var empty = &ptypes.Empty{} |
| 44 | |
| 45 | func 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 | |
| 73 | type local struct { |
| 74 | containers.Store |
nothing calls this directly
no test coverage detected
searching dependent graphs…