MCPcopy
hub / github.com/containerd/containerd / Update

Method Update

client/container.go:309–326  ·  view source on GitHub ↗
(ctx context.Context, opts ...UpdateContainerOpts)

Source from the content-addressed store, hash-verified

307}
308
309func (c *container) Update(ctx context.Context, opts ...UpdateContainerOpts) error {
310 // fetch the current container config before updating it
311 ctx, span := tracing.StartSpan(ctx, "container.Update")
312 defer span.End()
313 r, err := c.get(ctx)
314 if err != nil {
315 return err
316 }
317 for _, o := range opts {
318 if err := o(ctx, c.client, &r); err != nil {
319 return err
320 }
321 }
322 if _, err := c.client.ContainerService().Update(ctx, r); err != nil {
323 return errgrpc.ToNative(err)
324 }
325 return nil
326}
327
328func (c *container) handleMounts(ctx context.Context, request *tasks.CreateTaskRequest) error {
329 r, err := c.get(ctx)

Callers

nothing calls this directly

Calls 5

getMethod · 0.95
StartSpanFunction · 0.92
EndMethod · 0.80
ContainerServiceMethod · 0.80
UpdateMethod · 0.65

Tested by

no test coverage detected