MCPcopy Create free account
hub / github.com/Mirantis/cri-dockerd / validateExecRequest

Function validateExecRequest

streaming/server.go:165–178  ·  view source on GitHub ↗
(req *runtimeapi.ExecRequest)

Source from the content-addressed store, hash-verified

163}
164
165func validateExecRequest(req *runtimeapi.ExecRequest) error {
166 if req.ContainerId == "" {
167 return status.Errorf(codes.InvalidArgument, "missing required container_id")
168 }
169 if req.Tty && req.Stderr {
170 // If TTY is set, stderr cannot be true because multiplexing is not
171 // supported.
172 return status.Errorf(codes.InvalidArgument, "tty and stderr cannot both be true")
173 }
174 if !req.Stdin && !req.Stdout && !req.Stderr {
175 return status.Errorf(codes.InvalidArgument, "one of stdin, stdout, or stderr must be set")
176 }
177 return nil
178}
179
180func (s *server) GetExec(req *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error) {
181 if err := validateExecRequest(req); err != nil {

Callers 2

GetExecMethod · 0.85

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…