Update GRPC for consistency
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -146,7 +146,9 @@ func readContainer(container *containers.Container, bkt *bolt.Bucket) error {
|
||||
case string(bucketKeyImage):
|
||||
container.Image = string(v)
|
||||
case string(bucketKeyRuntime):
|
||||
container.Runtime = string(v)
|
||||
if err := container.Runtime.UnmarshalBinary(v); err != nil {
|
||||
return err
|
||||
}
|
||||
case string(bucketKeySpec):
|
||||
container.Spec = make([]byte, len(v))
|
||||
copy(container.Spec, v)
|
||||
@@ -187,9 +189,13 @@ func writeContainer(container *containers.Container, bkt *bolt.Bucket) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
runtime, err := container.Runtime.MarshalBinary()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, v := range [][2][]byte{
|
||||
{bucketKeyImage, []byte(container.Image)},
|
||||
{bucketKeyRuntime, []byte(container.Runtime)},
|
||||
{bucketKeyRuntime, runtime},
|
||||
{bucketKeySpec, container.Spec},
|
||||
{bucketKeyRootFS, []byte(container.RootFS)},
|
||||
{bucketKeyCreatedAt, createdAt},
|
||||
|
||||
@@ -46,7 +46,7 @@ func (s *imageStore) Get(ctx context.Context, name string) (images.Image, error)
|
||||
return image, nil
|
||||
}
|
||||
|
||||
func (s *imageStore) Put(ctx context.Context, name string, desc ocispec.Descriptor) error {
|
||||
func (s *imageStore) Update(ctx context.Context, name string, desc ocispec.Descriptor) error {
|
||||
namespace, err := namespaces.NamespaceRequired(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user