Documentation ¶
Index ¶
- Variables
- func CapabilityAdd(capFile string, c CapManageConfig) error
- func CapabilityAvail(c CapAvailConfig) error
- func CapabilityDrop(capFile string, c CapManageConfig) error
- func CapabilityList(capFile string, c CapListConfig) error
- func CleanSingularityCache(imgCache *cache.Handle, dryRun bool, cacheCleanTypes []string, days int) error
- func CompilePlugin(sourceDir, destSif, buildTags string) error
- func CreatePlugin(dir, name string) error
- func DeleteImage(ctx context.Context, scsConfig *scs.Config, imageRef, arch string) error
- func DisablePlugin(name, _ string) error
- func EnablePlugin(name string) error
- func FakerootConfig(username string, op FakerootConfigOp) error
- func GlobalConfig(args []string, configFile string, dry bool, op GlobalConfigOp) error
- func InspectPlugin(name string) error
- func InstallPlugin(pluginPath string) error
- func InstanceStats(ctx context.Context, name, instanceUser string, formatJSON bool, noStream bool) error
- func KeyserverAdd(name, uri string, order uint32, insecure bool) error
- func KeyserverList(remoteName string, usrConfigFile string) (err error)
- func KeyserverLogin(usrConfigFile string, args *LoginArgs) (err error)
- func KeyserverRemove(name, uri string) error
- func ListPlugins() error
- func ListSingularityCache(imgCache *cache.Handle, cacheListTypes []string, cacheListVerbose bool) error
- func OciCreate(containerID string, args *OciArgs) error
- func OciDelete(ctx context.Context, containerID string) error
- func OciExec(containerID string, cmdArgs []string) error
- func OciKill(containerID string, killSignal string) error
- func OciMount(ctx context.Context, image string, bundle string) error
- func OciPause(containerID string) error
- func OciResume(containerID string) error
- func OciRun(ctx context.Context, containerID string, args *OciArgs) error
- func OciStart(containerID string) error
- func OciState(containerID string, _ *OciArgs) error
- func OciUmount(ctx context.Context, bundle string) error
- func OciUpdate(containerID string, args *OciArgs) error
- func OtherLogout(usrConfigFile, name string, reqAuthFile string) (err error)
- func OverlayCreate(size int, imgPath string, overlaySparse bool, overlayDirs ...string) error
- func PrintInstanceList(w io.Writer, name, user string, formatJSON bool, showLogs bool) error
- func RegistryList(usrConfigFile string) (err error)
- func RegistryLogin(usrConfigFile string, args *LoginArgs, reqAuthFile string) (err error)
- func RemoteAdd(configFile, name, uri string, global, insecure, makeDefault bool) (err error)
- func RemoteList(usrConfigFile string) (err error)
- func RemoteLogin(usrConfigFile string, args *LoginArgs) (err error)
- func RemoteLogout(usrConfigFile, name string) (err error)
- func RemoteRemove(configFile, name string) (err error)
- func RemoteStatus(usrConfigFile, name string) (err error)
- func RemoteUse(usrConfigFile, name string, global, exclusive bool) (err error)
- func StopInstance(name, user string, sig syscall.Signal, timeout time.Duration) error
- func UninstallPlugin(name string) error
- func WriteInstancePidFile(name, pidFile string) error
- type CapAvailConfig
- type CapListConfig
- type CapManageConfig
- type FakerootConfigOp
- type GlobalConfigOp
- type LoginArgs
- type OciArgs
Constants ¶
This section is empty.
Variables ¶
var ErrLoginAborted = errors.New("user aborted login")
ErrLoginAborted is raised when the login process has been aborted by the user
Functions ¶
func CapabilityAdd ¶
func CapabilityAdd(capFile string, c CapManageConfig) error
CapabilityAdd adds the specified capability set to the capability file
func CapabilityAvail ¶
func CapabilityAvail(c CapAvailConfig) error
CapabilityAvail lists the capabilities based on the CapAvailConfig
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 CleanSingularityCache ¶
func CleanSingularityCache(imgCache *cache.Handle, dryRun bool, cacheCleanTypes []string, days int) error
CleanSingularityCache is the main function that drives all these other functions. If force is true, remove the entries, otherwise only provide a summary of what would have been done. If cacheCleanTypes contains something, only clean that type. The special value "all" is interpreted as "all types of entries". If cacheName contains something, clean only cache entries matching that name.
func CompilePlugin ¶
CompilePlugin compiles a plugin. It takes as input: sourceDir, the path to the plugin's source code directory; and destSif, the path to the intended final location of the plugin SIF file.
func CreatePlugin ¶
CreatePlugin create the plugin directory skeleton.
func DeleteImage ¶
DeleteImage deletes an image from a remote library.
func DisablePlugin ¶
DisablePlugin disables the named plugin.
func FakerootConfig ¶
func FakerootConfig(username string, op FakerootConfigOp) error
FakerootConfig allows to add/remove/enable/disable a user fakeroot mapping entry in /etc/subuid and /etc/subgid files.
func GlobalConfig ¶
func GlobalConfig(args []string, configFile string, dry bool, op GlobalConfigOp) error
GlobalConfig allows to set/unset/reset a configuration directive value in singularity.conf
func InstallPlugin ¶
InstallPlugin takes a plugin located at path and installs it into the singularity plugin installation directory.
Installing a plugin will also automatically enable it.
func InstanceStats ¶
func InstanceStats(ctx context.Context, name, instanceUser string, formatJSON bool, noStream bool) error
InstanceStats uses underlying cgroups to get statistics for a named instance
func KeyserverList ¶
KeyserverList prints information about remote configurations
func KeyserverLogin ¶
KeyserverLogin logs in to a keyserver.
func KeyserverRemove ¶
func ListPlugins ¶
func ListPlugins() error
ListPlugins lists the singularity plugins installed in the plugin installation directory.
func ListSingularityCache ¶
func ListSingularityCache(imgCache *cache.Handle, cacheListTypes []string, cacheListVerbose bool) error
ListSingularityCache will list the local singularity cache for the types specified by cacheListTypes. If cacheListTypes contains the value "all", all the cache entries are considered. If cacheListVerbose is true, the entries will be shown in the output, otherwise only a summary is provided.
func OtherLogout ¶ added in v4.1.0
RemoteLogout logs out from a keyserver or OCI/Docker registry.
func OverlayCreate ¶
OverlayCreate creates the overlay with an optional size, image path, dirs, and sparse option.
func PrintInstanceList ¶
PrintInstanceList fetches instance list, applying name and user filters, and prints it in a regular or a JSON format (if formatJSON is true) to the passed writer. Additionally, fetches log paths (if showLogs is true).
func RegistryList ¶
RegistryList prints information about remote configurations
func RegistryLogin ¶
RegistryLogin logs in to an OCI/Docker registry.
func RemoteList ¶
RemoteList prints information about remote configurations
func RemoteLogin ¶
RemoteLogin logs in remote by setting API token If the supplied remote name is an empty string, it will attempt to use the default remote.
func RemoteLogout ¶
RemoteLogout logs out from an endpoint.
func RemoteRemove ¶
RemoteRemove deletes a remote endpoint from the configuration
func RemoteStatus ¶
RemoteStatus checks status of services related to an endpoint If the supplied remote name is an empty string, it will attempt to use the default remote.
func StopInstance ¶
StopInstance fetches instance list, applying name and user filters, and stops them by sending a signal sig. If an instance is still running after a grace period defined by timeout is expired, it will be forcibly killed.
func UninstallPlugin ¶
UninstallPlugin removes the named plugin from the system.
func WriteInstancePidFile ¶
WriteInstancePidFile fetches instance's PID and writes it to the pidFile, truncating it if it already exists. Note that the name should not be a glob, i.e. name should identify a single instance only, otherwise an error is returned.
Types ¶
type CapAvailConfig ¶
CapAvailConfig instructs CapabilityAvail on what capability to list/describe
type CapListConfig ¶
CapListConfig instructs CapabilityList on what to list
type CapManageConfig ¶
CapManageConfig specifies what capability set to edit in the capability file
type FakerootConfigOp ¶
type FakerootConfigOp uint8
FakerootConfigOp defines a type for a fakeroot configuration operation.
const ( // FakerootAddUser is the operation to add a user fakeroot mapping. FakerootAddUser FakerootConfigOp = iota // FakerootRemoveUser is the operation to remove a user fakeroot mapping. FakerootRemoveUser // FakerootEnableUser is the operation to enable a user fakeroot mapping. FakerootEnableUser // FakerootDisableUser is the operation to disable a user fakeroot mapping. FakerootDisableUser )
type GlobalConfigOp ¶
type GlobalConfigOp uint8
GlobalConfigOp defines a type for a global configuration operation.
const ( // GlobalConfigSet is the operation to set a configuration directive value. GlobalConfigSet GlobalConfigOp = iota // GlobalConfigUnset is the operation to unset a configuration directive value. GlobalConfigUnset // GlobalConfigGet is the operation to get a configuration directive value. GlobalConfigGet // GlobalConfigReset is the operation to reset a configuration directive value. GlobalConfigReset )
Source Files ¶
- cache_clean_linux.go
- cache_list_linux.go
- capability_avail_linux.go
- capability_list_linux.go
- capability_manage_linux.go
- config_fakeroot_linux.go
- config_global_linux.go
- delete.go
- instance_linux.go
- keyserver_add.go
- keyserver_list.go
- keyserver_login.go
- keyserver_remove.go
- oci_linux.go
- overlay_create.go
- plugin_compile_linux.go
- plugin_create_linux.go
- plugin_disable_linux.go
- plugin_enable_linux.go
- plugin_inspect_linux.go
- plugin_install_linux.go
- plugin_list_linux.go
- plugin_uninstall_linux.go
- registry_list.go
- registry_login.go
- remote_add.go
- remote_list.go
- remote_login.go
- remote_logout.go
- remote_remove.go
- remote_status.go
- remote_use.go