MCPcopy
hub / github.com/containerd/containerd / ResizePty

Method ResizePty

plugins/services/tasks/local.go:540–558  ·  view source on GitHub ↗
(ctx context.Context, r *api.ResizePtyRequest, _ ...grpc.CallOption)

Source from the content-addressed store, hash-verified

538}
539
540func (l *local) ResizePty(ctx context.Context, r *api.ResizePtyRequest, _ ...grpc.CallOption) (*ptypes.Empty, error) {
541 t, err := l.getTask(ctx, r.ContainerID)
542 if err != nil {
543 return nil, err
544 }
545 p := runtime.Process(t)
546 if r.ExecID != "" {
547 if p, err = t.Process(ctx, r.ExecID); err != nil {
548 return nil, errgrpc.ToGRPC(err)
549 }
550 }
551 if err := p.ResizePty(ctx, runtime.ConsoleSize{
552 Width: r.Width,
553 Height: r.Height,
554 }); err != nil {
555 return nil, errgrpc.ToGRPC(err)
556 }
557 return empty, nil
558}
559
560func (l *local) CloseIO(ctx context.Context, r *api.CloseIORequest, _ ...grpc.CallOption) (*ptypes.Empty, error) {
561 t, err := l.getTask(ctx, r.ContainerID)

Callers

nothing calls this directly

Calls 4

getTaskMethod · 0.95
ProcessInterface · 0.92
ProcessMethod · 0.65
ResizePtyMethod · 0.65

Tested by

no test coverage detected