MCPcopy
hub / github.com/containerd/containerd / CloseIO

Method CloseIO

client/task.go:508–524  ·  view source on GitHub ↗
(ctx context.Context, opts ...IOCloserOpts)

Source from the content-addressed store, hash-verified

506}
507
508func (t *task) CloseIO(ctx context.Context, opts ...IOCloserOpts) error {
509 ctx, span := tracing.StartSpan(ctx, "task.CloseIO",
510 tracing.WithAttribute("task.id", t.ID()),
511 )
512 defer span.End()
513 r := &tasks.CloseIORequest{
514 ContainerID: t.id,
515 }
516 var i IOCloseInfo
517 for _, o := range opts {
518 o(&i)
519 }
520 r.Stdin = i.Stdin
521
522 _, err := t.client.TaskService().CloseIO(ctx, r)
523 return errgrpc.ToNative(err)
524}
525
526func (t *task) IO() cio.IO {
527 return t.io

Callers

nothing calls this directly

Calls 6

IDMethod · 0.95
StartSpanFunction · 0.92
WithAttributeFunction · 0.92
EndMethod · 0.80
TaskServiceMethod · 0.80
CloseIOMethod · 0.65

Tested by

no test coverage detected