Make Diff/Apply plugable

Signed-off-by: Volodymyr Burenin <vburenin@gmail.com>
This commit is contained in:
Volodymyr Burenin
2017-06-01 18:38:33 -05:00
parent 35d74aa9d8
commit 3c76a667b6
11 changed files with 249 additions and 143 deletions

12
plugin/differ.go Normal file
View File

@@ -0,0 +1,12 @@
package plugin
import (
"github.com/containerd/containerd/mount"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"golang.org/x/net/context"
)
type Differ interface {
Apply(ctx context.Context, desc ocispec.Descriptor, mount []mount.Mount) (ocispec.Descriptor, error)
DiffMounts(ctx context.Context, lower, upper []mount.Mount, media, ref string) (ocispec.Descriptor, error)
}