Documentation ¶
Index ¶
- Constants
- func IsEmpty(name string) (bool, error)
- type ContainerPath
- type ControlFileType
- type HPKPath
- func (p HPKPath) CorruptedDir() string
- func (p HPKPath) ImageDir() string
- func (p HPKPath) ParseControlFilePath(absPath string) (podKey types.NamespacedName, fileName string, invalid bool)
- func (p HPKPath) Pod(podRef client.ObjectKey) PodPath
- func (p HPKPath) String() string
- func (p HPKPath) WalkPodDirectories(f WalkPodFunc) error
- type PodPath
- func (p PodPath) CgroupFilePath() string
- func (p PodPath) ConstructorFilePath() string
- func (p PodPath) Container(containerName string) ContainerPath
- func (p PodPath) ControlFileDir() string
- func (p PodPath) EncodedJSONPath() string
- func (p PodPath) IPAddressPath() string
- func (p PodPath) JobDir() string
- func (p PodPath) LogDir() string
- func (p PodPath) PodEnvironmentIsOK() (bool, string)
- func (p PodPath) StderrPath() string
- func (p PodPath) StdoutPath() string
- func (p PodPath) String() string
- func (p PodPath) SubmitJobPath() string
- func (p PodPath) SysErrorFilePath() string
- func (p PodPath) VolumeDir() string
- type WalkPodFunc
Constants ¶
const ( PodGlobalDirectoryPermissions = os.FileMode(0o777) PodSpecJsonFilePermissions = os.FileMode(0o600) ContainerJobPermissions = os.FileMode(0o777) )
const ( // ExtensionCRD describes the file where HPK will write the pod definition. ExtensionCRD = ".crd" // ExtensionStdout describes the file where the sbatch script will write its stdout. ExtensionStdout = ".stdout" // ExtensionStderr describes the file where the sbatch script will write its stderr. ExtensionStderr = ".stderr" )
Pod-Related Extensions
const ( // ExtensionEnvironment describes the file where the environment variables for the container are held. ExtensionEnvironment = ".env" // ExtensionLogs describes the file where the sbatch script will write its logs. ExtensionLogs = ".logs" )
Container-Related Extensions
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContainerPath ¶
type ContainerPath struct {
// contains filtered or unexported fields
}
func (ContainerPath) EnvFilePath ¶
func (c ContainerPath) EnvFilePath() string
func (ContainerPath) ExitCodePath ¶
func (c ContainerPath) ExitCodePath() string
func (ContainerPath) IDPath ¶
func (c ContainerPath) IDPath() string
func (ContainerPath) LogsPath ¶
func (c ContainerPath) LogsPath() string
type ControlFileType ¶
type ControlFileType = string
const ( // ExtensionSysError describes the file where the sbatch will describe its failure. ExtensionSysError ControlFileType = ".syserror" // ExtensionIP describes the file where the sbatch script will write its ip. ExtensionIP ControlFileType = ".ip" // ExtensionExitCode describes the file where the sbatch script will write its exit code. ExtensionExitCode ControlFileType = ".exitCode" // ExtensionJobID describes the file where the sbatch script will write its job id. ExtensionJobID ControlFileType = ".jobid" )
Control File (Written by the Sbatch script)
type HPKPath ¶
type HPKPath string
func (HPKPath) CorruptedDir ¶
func (HPKPath) ParseControlFilePath ¶
func (p HPKPath) ParseControlFilePath(absPath string) (podKey types.NamespacedName, fileName string, invalid bool)
ParseControlFilePath parses the path according to the expected HPK format, and returns the corresponding fields. Validated through: https://regex101.com/r/olnlMx/1
func (HPKPath) WalkPodDirectories ¶
func (p HPKPath) WalkPodDirectories(f WalkPodFunc) error
type PodPath ¶
type PodPath string
func (PodPath) CgroupFilePath ¶
CgroupFilePath .hpk/namespace/podName/.virtualenv/cgroup.toml
func (PodPath) ConstructorFilePath ¶
ConstructorFilePath .hpk/namespace/podName/.virtualenv/constructor.sh
func (PodPath) Container ¶
func (p PodPath) Container(containerName string) ContainerPath
func (PodPath) ControlFileDir ¶
func (PodPath) EncodedJSONPath ¶
EncodedJSONPath .hpk/namespace/podName/.virtualenv/pod.crd
func (PodPath) IPAddressPath ¶
IPAddressPath points $HPK/<namespace>/<podName>/controlfile/.ip
func (PodPath) PodEnvironmentIsOK ¶
PodEnvironmentIsOK checks if the pod structure is ok, and if it is not, it returns an indiciate reason
func (PodPath) StderrPath ¶
StderrPath $HPK/<namespace>/<podName>/logs/.stderr
func (PodPath) StdoutPath ¶
StdoutPath $HPK/<namespace>/<podName>/logs/.stdout
func (PodPath) SubmitJobPath ¶
SubmitJobPath .hpk/namespace/podName/.virtualenv/submit.sh
func (PodPath) SysErrorFilePath ¶
SysErrorFilePath points to $HPK/<namespace>/<podName>/controlfile/.syserror