MCPcopy
hub / github.com/containerd/containerd / Create

Method Create

client/image_store.go:66–79  ·  view source on GitHub ↗
(ctx context.Context, image images.Image)

Source from the content-addressed store, hash-verified

64}
65
66func (s *remoteImages) Create(ctx context.Context, image images.Image) (images.Image, error) {
67 req := &imagesapi.CreateImageRequest{
68 Image: imageToProto(&image),
69 }
70 if tm := epoch.FromContext(ctx); tm != nil {
71 req.SourceDateEpoch = timestamppb.New(*tm)
72 }
73 created, err := s.client.Create(ctx, req)
74 if err != nil {
75 return images.Image{}, errgrpc.ToNative(err)
76 }
77
78 return imageFromProto(created.Image), nil
79}
80
81func (s *remoteImages) Update(ctx context.Context, image images.Image, fieldpaths ...string) (images.Image, error) {
82 var updateMask *ptypes.FieldMask

Callers

nothing calls this directly

Calls 4

FromContextFunction · 0.92
imageToProtoFunction · 0.70
imageFromProtoFunction · 0.70
CreateMethod · 0.65

Tested by

no test coverage detected