(ctx context.Context, opts ...UpdateContainerOpts)
| 307 | } |
| 308 | |
| 309 | func (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 | |
| 328 | func (c *container) handleMounts(ctx context.Context, request *tasks.CreateTaskRequest) error { |
| 329 | r, err := c.get(ctx) |
nothing calls this directly
no test coverage detected