INNER CODE UNIT · Go

Attach

kubernetes-sigs/cri-tools · cmd/crictl/attach.go:116

func Attach(ctx context.Context, client internalapi.RuntimeService, opts attachOptions) error {
	if opts.id == "" {
		return errIDEmpty
	}

	request := &pb.AttachRequest{
		ContainerId: opts.id,
		Tty:         opts.tty,
		Stdin:       opts.stdin,
		Stdout:      true,
		Stderr:      !opts.tty,
	}
	logrus.Debugf("AttachRequest: %v", request)

	r, err := InterruptableRPC(ctx, func(ctx context.Context) (*pb.AttachResponse, error) {
		return client.Attach(ctx, request)
	})
	logrus.Debugf("AttachResponse: %v", r)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…