MCPcopy
hub / github.com/containerd/containerd / Resize

Method Resize

client/task.go:530–547  ·  view source on GitHub ↗
(ctx context.Context, w, h uint32)

Source from the content-addressed store, hash-verified

528}
529
530func (t *task) Resize(ctx context.Context, w, h uint32) error {
531 ctx, span := tracing.StartSpan(ctx, tracing.Name("client.task", "Resize"),
532 tracing.WithAttribute("task.id", t.ID()),
533 tracing.WithNamespace(ctx),
534 )
535 defer span.End()
536 span.SetAttributes(
537 tracing.Attribute("task.pty.width", int64(w)),
538 tracing.Attribute("task.pty.height", int64(h)),
539 )
540
541 _, err := t.client.TaskService().ResizePty(ctx, &tasks.ResizePtyRequest{
542 ContainerID: t.id,
543 Width: w,
544 Height: h,
545 })
546 return errgrpc.ToNative(err)
547}
548
549// NOTE: Checkpoint supports to dump task information to a directory, in this way, an empty
550// OCI Index will be returned.

Callers

nothing calls this directly

Calls 10

IDMethod · 0.95
StartSpanFunction · 0.92
NameFunction · 0.92
WithAttributeFunction · 0.92
WithNamespaceFunction · 0.92
AttributeFunction · 0.92
EndMethod · 0.80
SetAttributesMethod · 0.80
TaskServiceMethod · 0.80
ResizePtyMethod · 0.65

Tested by

no test coverage detected