Documentation ¶
Index ¶
- Variables
- func WithCPUCount(cru uint) oci.SpecOpts
- func WithMemoryLimit(limit uint64) oci.SpecOpts
- type Module
- func (c *Module) Delete(ns string, id pkg.ContainerID) error
- func (c *Module) Inspect(ns string, id pkg.ContainerID) (result pkg.Container, err error)
- func (c *Module) List(ns string) ([]pkg.ContainerID, error)
- func (c *Module) ListNS() ([]string, error)
- func (c *Module) Run(ns string, data pkg.Container) (id pkg.ContainerID, err error)
- func (c *Module) Watch(ctx context.Context)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyRootFS is returned when RootFS field is empty when trying to create a container ErrEmptyRootFS = errors.New("RootFS of the container creation data cannot be empty") )
Functions ¶
func WithCPUCount ¶
WithCPUCount configure the CPU cgroup to limit the amount of CPU used by the container
func WithMemoryLimit ¶
WithMemoryLimit sets the `Linux.LinuxResources.Memory.Limit` section to the `limit` specified if the `Linux` section is not `nil`. Additionally sets the `Windows.WindowsResources.Memory.Limit` section if the `Windows` section is not `nil`.
Types ¶
type Module ¶ added in v0.4.9
type Module struct {
// contains filtered or unexported fields
}
Module implements pkg.Module interface
func (*Module) Delete ¶ added in v0.4.9
func (c *Module) Delete(ns string, id pkg.ContainerID) error
Delete stops and remove a container
func (*Module) List ¶ added in v0.4.9
func (c *Module) List(ns string) ([]pkg.ContainerID, error)
List all the existing container IDs from a certain namespace ns
Click to show internal directories.
Click to hide internal directories.