specgenutil

package
v4.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateExitCommandArgs

func CreateExitCommandArgs(storageConfig storageTypes.StoreOptions, config *config.Config, syslog, rm, exec bool) ([]string, error)

func CreateExpose

func CreateExpose(expose []string) (map[uint16]string, error)

CreateExpose parses user-provided exposed port definitions and converts them into SpecGen format. TODO: The SpecGen format should really handle ranges more sanely - we could be massively inflating what is sent over the wire with a large range.

func CreatePortBindings

func CreatePortBindings(ports []string) ([]types.PortMapping, error)

CreatePortBindings iterates ports mappings into SpecGen format.

func LimitToSwap

func LimitToSwap(memory *specs.LinuxMemory, swap string, ml int64)

func Mounts

func Mounts(mountFlag []string) (map[string]spec.Mount, map[string]*specgen.NamedVolume, map[string]*specgen.ImageVolume, error)

Mounts takes user-provided input from the --mount flag and creates OCI spec mounts and Libpod named volumes. podman run --mount type=bind,src=/etc/resolv.conf,target=/etc/resolv.conf ... podman run --mount type=tmpfs,target=/dev/shm ... podman run --mount type=volume,source=test-volume, ...

func ReadPodIDFile

func ReadPodIDFile(path string) (string, error)

ReadPodIDFile reads the specified file and returns its content (i.e., first line).

func ReadPodIDFiles

func ReadPodIDFiles(files []string) ([]string, error)

ReadPodIDFiles reads the specified files and returns their content (i.e., first line).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL