NotifyMemoryPressure returns a read-only channel signaling when the container reaches a given pressure level.
(level PressureLevel)
| 816 | // NotifyMemoryPressure returns a read-only channel signaling when the |
| 817 | // container reaches a given pressure level. |
| 818 | func (c *Container) NotifyMemoryPressure(level PressureLevel) (<-chan struct{}, error) { |
| 819 | // XXX(cyphar): This requires cgroups. |
| 820 | if c.config.RootlessCgroups { |
| 821 | logrus.Warn("getting memory pressure notifications may fail if you don't have the full access to cgroups") |
| 822 | } |
| 823 | return notifyMemoryPressure(c.cgroupManager.Path("memory"), level) |
| 824 | } |
| 825 | |
| 826 | func (c *Container) updateState(process parentProcess) (*State, error) { |
| 827 | if process != nil { |
nothing calls this directly
no test coverage detected