MCPcopy
hub / github.com/containerd/containerd / Exec

Method Exec

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

Source from the content-addressed store, hash-verified

516}
517
518func (l *local) Exec(ctx context.Context, r *api.ExecProcessRequest, _ ...grpc.CallOption) (*ptypes.Empty, error) {
519 if r.ExecID == "" {
520 return nil, status.Errorf(codes.InvalidArgument, "exec id cannot be empty")
521 }
522 t, err := l.getTask(ctx, r.ContainerID)
523 if err != nil {
524 return nil, err
525 }
526 if _, err := t.Exec(ctx, r.ExecID, runtime.ExecOpts{
527 Spec: r.Spec,
528 IO: runtime.IO{
529 Stdin: r.Stdin,
530 Stdout: r.Stdout,
531 Stderr: r.Stderr,
532 Terminal: r.Terminal,
533 },
534 }); err != nil {
535 return nil, errgrpc.ToGRPC(err)
536 }
537 return empty, nil
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)

Callers

nothing calls this directly

Calls 2

getTaskMethod · 0.95
ExecMethod · 0.65

Tested by

no test coverage detected