// Pids returns all pids inside the container
// Since for kata, it cannot get the process's pid from VM,
// thus only return the Shim's pid directly.
Pids returns all pids inside the container
Since for kata, it cannot get the process's pid from VM,
thus only return the Shim's pid directly.
// Pids returns all pids inside the container // Since for kata it cannot get the process ' s pid from VM // thus only return the Shim ' s pid directly .
func (s *service) Pids(ctx context.Context, r *taskAPI.PidsRequest) (_ *taskAPI.PidsResponse, err error) {
	var processes []*task.ProcessInfo
	start := time.Now()
	defer func() {
		err = toGRPC(err)
		rpcDurationsHistogram.WithLabelValues("pids").Observe(float64(time.Since(start).Nanoseconds() / int64(time.Millisecond)))
	}()
	pInfo := task.ProcessInfo{
		Pid: s.pid,
	}
	processes = append(processes, &pInfo)
	return &taskAPI.PidsResponse{
		Processes: processes,
	}, nil
}
func ( s * service ) Pids ( ctx context . Context , r * taskAPI . PidsRequest ) ( _ * taskAPI . PidsResponse , err error ) { var processes [ ] * task . ProcessInfo start := time . Now ( ) defer func ( ) { err = toGRPC ( err ) rpcDurationsHistogram . WithLabelValues ( " " ) . Observe ( float64 ( time . Since ( start ) . Nanoseconds ( ) / int64 ( time . Millisecond ) ) ) } ( ) pInfo := task . ProcessInfo { Pid : s . pid , } processes = append ( processes , & pInfo ) return & taskAPI . PidsResponse { Processes : processes , } , nil }
Pids returns all pids inside the container
Since for kata, it cannot get the process's pid from VM,
thus only return the Shim's pid directly.
Pids returns all pids inside the container Since for kata it cannot get the process ' s pid from VM thus only return the Shim ' s pid directly .