Documentation ¶
Overview ¶
Package job contains code for accessing compute resources via Slurm.
Package job contains code for accessing compute resources via Slurm.
Package job contains code for accessing compute resources via Slurm.
Index ¶
- Variables
- func CancelJob(args string) (string, error)
- func ConnectionOK() bool
- func SetContainerStatusID(status *corev1.ContainerStatus, typedValue string)
- func SetPodID(pod *corev1.Pod, idType JobIDType, value string)
- func SubmitJob(scriptFile string) (string, error)
- type EventHandler
- type JobIDType
- type Options
- type PodControl
Constants ¶
This section is empty.
Variables ¶
var ErrClosedQueue = errors.New("queue is closed")
var ExcludeNodes = "--exclude="
ExcludeNodes EXISTS ONLY FOR DEBUGGING PURPOSES of Inotify on NFS.
var NewUserEnv = "--get-user-env"
NewUserEnv is used to generate the /run/user/ folder required by cgroups.
var Slurm struct { SubmitCmd string CancelCmd string StatsCmd string }
Slurm represents a SLURM installation.
Functions ¶
func ConnectionOK ¶
func ConnectionOK() bool
ConnectionOK return true if HPK maintains connection with the Slurm manager. Otherwise, it returns false.
func SetContainerStatusID ¶
func SetContainerStatusID(status *corev1.ContainerStatus, typedValue string)
Types ¶
type EventHandler ¶
type EventHandler struct { Opts Options Queue chan fsnotify.Event Finished bool // contains filtered or unexported fields }
EventHandler represents the datastructure for an EventHandler instance. This struct satisfies the EventHandler interface.
func NewEventHandler ¶
func NewEventHandler(opts Options) *EventHandler
func (*EventHandler) Push ¶
func (h *EventHandler) Push(event fsnotify.Event)
Push adds a new event payload to the queue.
func (*EventHandler) Run ¶
func (h *EventHandler) Run(ctx context.Context, control PodControl)
Run spawns workers and listens to the queue It's a blocking function and waits for a cancellation invocation from the Client.
type JobIDType ¶
type JobIDType string
func ParseContainerID ¶
func ParseContainerID(status *corev1.ContainerStatus) (idType JobIDType, value string)