diff: resplit Applier from Differ

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2017-11-13 06:46:29 +00:00
committed by Derek McGowan
parent b268261446
commit b580441f91
7 changed files with 36 additions and 21 deletions

View File

@@ -11,7 +11,7 @@ import (
// NewDiffServiceFromClient returns a new diff service which communicates
// over a GRPC connection.
func NewDiffServiceFromClient(client diffapi.DiffClient) diff.Differ {
func NewDiffServiceFromClient(client diffapi.DiffClient) diff.DiffApplier {
return &diffRemote{
client: client,
}
@@ -33,7 +33,7 @@ func (r *diffRemote) Apply(ctx context.Context, diff ocispec.Descriptor, mounts
return toDescriptor(resp.Applied), nil
}
func (r *diffRemote) DiffMounts(ctx context.Context, a, b []mount.Mount, opts ...diff.Opt) (ocispec.Descriptor, error) {
func (r *diffRemote) Diff(ctx context.Context, a, b []mount.Mount, opts ...diff.Opt) (ocispec.Descriptor, error) {
var config diff.Config
for _, opt := range opts {
if err := opt(&config); err != nil {