MCPcopy Create free account
hub / github.com/containerd/cgroups / MoveTo

Method MoveTo

cgroup2/manager.go:562–576  ·  view source on GitHub ↗
(destination *Manager)

Source from the content-addressed store, hash-verified

560}
561
562func (c *Manager) MoveTo(destination *Manager) error {
563 processes, err := c.Procs(true)
564 if err != nil {
565 return err
566 }
567 for _, p := range processes {
568 if err := destination.AddProc(p); err != nil {
569 if strings.Contains(err.Error(), "no such process") {
570 continue
571 }
572 return err
573 }
574 }
575 return nil
576}
577
578// Stat returns all cgroup stats.
579// This is equivalent to calling StatFiltered(StatAll).

Callers 1

TestMoveToFunction · 0.95

Calls 2

ProcsMethod · 0.95
AddProcMethod · 0.65

Tested by 1

TestMoveToFunction · 0.76