Move Container and runtime to plugin pkg

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-05-11 15:24:12 -07:00
parent fa4e114979
commit 01b9f5ec67
10 changed files with 63 additions and 61 deletions

View File

@@ -4,11 +4,12 @@ import (
"sync"
"github.com/containerd/containerd"
"github.com/containerd/containerd/plugin"
"golang.org/x/net/context"
)
func newCollector(ctx context.Context, runtimes map[string]containerd.Runtime) (*collector, error) {
func newCollector(ctx context.Context, runtimes map[string]plugin.Runtime) (*collector, error) {
c := &collector{
context: ctx,
ch: make(chan *containerd.Event, 2048),
@@ -42,7 +43,7 @@ type collector struct {
}
// collect collects events from the provided runtime
func (c *collector) collect(r containerd.Runtime) error {
func (c *collector) collect(r plugin.Runtime) error {
c.wg.Add(1)
go func() {
defer c.wg.Done()