MCPcopy Index your code
hub / github.com/containerd/containerd / WithResources

Function WithResources

integration/main_test.go:360–367  ·  view source on GitHub ↗

Add container resource limits.

(r *runtime.LinuxContainerResources)

Source from the content-addressed store, hash-verified

358
359// Add container resource limits.
360func 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.
370func WithWindowsResources(r *runtime.WindowsContainerResources) ContainerOpts {

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…