// NewPlugin returns an implementation of container.Plugin suitable for passing to container.RegisterPlugin() func NewPlugin() container.Plugin { … } type plugin … func (p *plugin) InitializeFSContext(context *fs.Context) error { … } func (p *plugin) Register(factory info.MachineInfoFactory, fsInfo fs.FsInfo, includedMetrics container.MetricSet) (watcher.ContainerWatcher, error) { … }