Documentation ¶
Index ¶
- Constants
- func BundleUser(bundlePath, user string) (u *user.User, err error)
- func CreateLoop(file *os.File, offset, size uint64) (string, io.Closer, error)
- func CreateOverlay(ctx context.Context, bundlePath string) error
- func CreateOverlayTmpfs(ctx context.Context, bundlePath string, sizeMiB int, allowSetuid bool) (string, error)
- func DeleteBundle(bundlePath string) error
- func DeleteOverlay(ctx context.Context, bundlePath string) error
- func DeleteOverlayTmpfs(ctx context.Context, bundlePath, olDir string) error
- func GenerateBundleConfig(bundlePath string, config *specs.Spec) (*generate.Generator, error)
- func PrepareOverlayTmpfs(bundlePath string, sizeMiB int, allowSetuid bool) (string, error)
- func SaveBundleConfig(bundlePath string, g *generate.Generator) error
- type Config
- type Layers
- type RootFs
- type Volumes
Constants ¶
const RunScript = "/.singularity.d/actions/run"
RunScript is the default process argument
Variables ¶
This section is empty.
Functions ¶
func BundleUser ¶
BundleUser returns a user struct for the specified user, from the bundle passwd file.
func CreateLoop ¶
CreateLoop associates a file to loop device and returns path of loop device used and a closer to close the loop device
func CreateOverlay ¶
CreateOverlay creates a writable overlay using a directory inside the OCI bundle.
func CreateOverlayTmpfs ¶
func CreateOverlayTmpfs(ctx context.Context, bundlePath string, sizeMiB int, allowSetuid bool) (string, error)
CreateOverlay creates a writable overlay using tmpfs, mounting it over the bundle rootfs.
func DeleteBundle ¶
DeleteBundle deletes bundle directory
func DeleteOverlay ¶
DeleteOverlay deletes an overlay previously created using a directory inside the OCI bundle.
func DeleteOverlayTmpfs ¶
DeleteOverlayTmpfs unmounts and deletes a tmpfs backed overlay created with CreateOverlayTmpfs.
func GenerateBundleConfig ¶
GenerateBundleConfig generates a minimal OCI bundle directory with the provided OCI configuration or a default one if there is no configuration
func PrepareOverlayTmpfs ¶ added in v4.1.0
PrepareOverlayTmpfs creates a tmpfs, mounted to the overlay/ directory in the bundle, but does not perform an overlay mount using it.
Types ¶
type Config ¶
type Config string
Config provides functions for accessing the runtime configuration (JSON) of a bundle. It is initialized with the path of the bundle.
type Layers ¶ added in v4.1.0
type Layers string
Layers provides functions for accessing the layers directory of a bundle, which will hold any image layer directories that are created. It is initialized with the path of the bundle.
type RootFs ¶
type RootFs string
RootFs provides functions for accessing the rootfs directory of a bundle. It is initialized with the path of the bundle.