Update the content interface to return info from update

Namespace keys used by client for uncompressed

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2017-07-12 16:22:13 -07:00
parent 4f388e0e27
commit a78d0bdeac
10 changed files with 318 additions and 181 deletions

View File

@@ -60,7 +60,7 @@ type Manager interface {
// fields will be updated.
// Mutable fields:
// labels.*
Update(ctx context.Context, info Info, fieldpaths ...string) error
Update(ctx context.Context, info Info, fieldpaths ...string) (Info, error)
// Walk will call fn for each item in the content store which
// match the provided filters. If no filters are given all

View File

@@ -93,9 +93,9 @@ func (cs *store) Delete(ctx context.Context, dgst digest.Digest) error {
return nil
}
func (cs *store) Update(ctx context.Context, info Info, fieldpaths ...string) error {
func (cs *store) Update(ctx context.Context, info Info, fieldpaths ...string) (Info, error) {
// TODO: Support persisting and updating mutable content data
return errors.Wrapf(errdefs.ErrFailedPrecondition, "update not supported on immutable content store")
return Info{}, errors.Wrapf(errdefs.ErrFailedPrecondition, "update not supported on immutable content store")
}
func (cs *store) Walk(ctx context.Context, fn WalkFunc, filters ...string) error {