Add container resource limits.
(r *runtime.LinuxContainerResources)
| 358 | |
| 359 | // Add container resource limits. |
| 360 | func WithResources(r *runtime.LinuxContainerResources) ContainerOpts { |
| 361 | return func(c *runtime.ContainerConfig) { |
| 362 | if c.Linux == nil { |
| 363 | c.Linux = &runtime.LinuxContainerConfig{} |
| 364 | } |
| 365 | c.Linux.Resources = r |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | // Adds Windows container resource limits. |
| 370 | func WithWindowsResources(r *runtime.WindowsContainerResources) ContainerOpts { |
no outgoing calls
no test coverage detected
searching dependent graphs…