singularity

package
Version: v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: BSD-3-Clause Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CapabilityAdd

func CapabilityAdd(capFile string, c CapManageConfig) error

CapabilityAdd adds the specified capability set to the capability file

func CapabilityDrop

func CapabilityDrop(capFile string, c CapManageConfig) error

CapabilityDrop drops the specified capability set from the capability file

func CapabilityList

func CapabilityList(capFile string, c CapListConfig) error

CapabilityList lists the capabilities based on the CapListConfig

func CleanCache

func CleanCache(cacheType string) error

CleanCache : clean a type of cache (cacheType string). will return a error if one occurs.

func CleanCacheName

func CleanCacheName(cacheName string, libraryCache, ociCache bool) (bool, error)

CleanCacheName : will clean a container with the same name as cacheName (in the cache directory). if libraryCache == true; only search thrught library cache. if ociCache == true; only search the oci-tmp cache. if both are false; search all cache, and if both are true; again, search all cache.

func CleanSingularityCache

func CleanSingularityCache(cleanAll bool, cacheCleanTypes []string, cacheName string) error

CleanSingularityCache : the main function that drives all these other functions, if allClean == true; clean all cache. if typeNameClean contains somthing; only clean that type. if cacheName contains somthing; clean only cache with that name.

func ListSingularityCache

func ListSingularityCache(cacheListTypes []string, listAll bool) error

ListSingularityCache : list local singularity cache, typeNameList : is a string of what cache to list (seprate each type with a comma; like this: library,oci,blob) allList : force list all cache.

func OciAttach

func OciAttach(containerID string) error

OciAttach attaches console to a running container

func OciCreate

func OciCreate(containerID string, args *OciArgs) error

OciCreate creates a container from an OCI bundle

func OciDelete

func OciDelete(containerID string) error

OciDelete deletes container resources

func OciExec

func OciExec(containerID string, cmdArgs []string) error

OciExec executes a command in a container

func OciKill

func OciKill(containerID string, killSignal string, killTimeout int) error

OciKill kills container process

func OciMount

func OciMount(image string, bundle string) error

OciMount mount a SIF image to create an OCI bundle

func OciPauseResume

func OciPauseResume(containerID string, pause bool) error

OciPauseResume pauses/resumes processes in a container

func OciRun

func OciRun(containerID string, args *OciArgs) error

OciRun runs a container (equivalent to create/start/delete)

func OciStart

func OciStart(containerID string) error

OciStart starts a previously create container

func OciState

func OciState(containerID string, args *OciArgs) error

OciState query container state

func OciUmount

func OciUmount(bundle string) error

OciUmount umount SIF and delete OCI bundle

func OciUpdate

func OciUpdate(containerID string, args *OciArgs) error

OciUpdate updates container cgroups resources

Types

type CapListConfig

type CapListConfig struct {
	User  string
	Group string
	All   bool
}

CapListConfig instructs CapabilityList on what to list

type CapManageConfig

type CapManageConfig struct {
	Caps  string
	User  string
	Group string
	Desc  bool
}

CapManageConfig specifies what capability set to edit in the capability file

type OciArgs

type OciArgs struct {
	BundlePath     string
	LogPath        string
	LogFormat      string
	SyncSocketPath string
	EmptyProcess   bool
	PidFile        string
	FromFile       string
	KillSignal     string
}

OciArgs contains CLI arguments

Jump to

Keyboard shortcuts

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