func (c *ContainerdUtil) TaskPids(ctn containerd.Container) ([]containerd.ProcessInfo, error) {
	ctx, cancel := context.WithTimeout(context.Background(), c.queryTimeout)
	defer cancel()
	ctxNamespace := namespaces.WithNamespace(ctx, c.namespace)

	t, errTask := ctn.Task(ctxNamespace, nil)
	if errTask != nil {
		return nil, errTask
	}

	return t.Pids(ctxNamespace)
}
// TaskPids interfaces with the containerd api to get the pids from a container
TaskPids interfaces with the containerd api to get the pids from a container
// TaskPids interfaces with the containerd api to get the pids from a container
func (c *ContainerdUtil) TaskPids(ctn containerd.Container) ([]containerd.ProcessInfo, error) {
	ctx, cancel := context.WithTimeout(context.Background(), c.queryTimeout)
	defer cancel()
	ctxNamespace := namespaces.WithNamespace(ctx, c.namespace)
	t, errTask := ctn.Task(ctxNamespace, nil)
	if errTask != nil {
		return nil, errTask
	}
	return t.Pids(ctxNamespace)
}
func ( c * ContainerdUtil ) TaskPids ( ctn containerd . Container ) ( [ ] containerd . ProcessInfo , error ) { ctx , cancel := context . WithTimeout ( context . Background ( ) , c . queryTimeout ) defer cancel ( ) ctxNamespace := namespaces . WithNamespace ( ctx , c . namespace ) t , errTask := ctn . Task ( ctxNamespace , nil ) if errTask != nil { return nil , errTask } return t . Pids ( ctxNamespace ) }
TaskPids interfaces with the containerd api to get the pids from a container
TaskPids interfaces with the containerd api to get the pids from a container