// Connect returns shim information such as the shim's pid
Connect returns shim information such as the shim's pid
// Connect returns shim information such as the shim ' s pid
func (s *service) Connect(ctx context.Context, r *taskAPI.ConnectRequest) (_ *taskAPI.ConnectResponse, err error) {
	start := time.Now()
	defer func() {
		err = toGRPC(err)
		rpcDurationsHistogram.WithLabelValues("connect").Observe(float64(time.Since(start).Nanoseconds() / int64(time.Millisecond)))
	}()
	s.mu.Lock()
	defer s.mu.Unlock()
	return &taskAPI.ConnectResponse{
		ShimPid: s.pid,
		TaskPid: s.pid,
	}, nil
}
func ( s * service ) Connect ( ctx context . Context , r * taskAPI . ConnectRequest ) ( _ * taskAPI . ConnectResponse , err error ) { start := time . Now ( ) defer func ( ) { err = toGRPC ( err ) rpcDurationsHistogram . WithLabelValues ( " " ) . Observe ( float64 ( time . Since ( start ) . Nanoseconds ( ) / int64 ( time . Millisecond ) ) ) } ( ) s . mu . Lock ( ) defer s . mu . Unlock ( ) return & taskAPI . ConnectResponse { ShimPid : s . pid , TaskPid : s . pid , } , nil }
Connect returns shim information such as the shim's pid
Connect returns shim information such as the shim ' s pid
//Since kata cannot get the container's pid in VM, thus only return the shim's pid.