command

package
v0.0.0-...-9d695bc Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SacctJobCmdSwitches    = []string{"-n", "--json", "-j"}
	ScancelJobCmdSwitches  = []string{}
	SholdJobCmdSwitches    = []string{"hold"}
	SrequeueJobCmdSwitches = []string{"requeue"}
	SbatchCmdSwitches      = []string{}
	SacctmgrCmdSwitches    = []string{"list", "Association", "format=account", "-P", "-n"}
)

Functions

func CallSbatch

func CallSbatch(jobfile string, l *log.Logger) tea.Cmd

TODO: unify this to a single function

func CallScancel

func CallScancel(jobid string, l *log.Logger) tea.Cmd

func CallScontrolHold

func CallScontrolHold(jobid string, l *log.Logger) tea.Cmd

func CallScontrolRequeue

func CallScontrolRequeue(jobid string, l *log.Logger) tea.Cmd

TODO: unify this to a single function

func CallSsh

func CallSsh(node string, l *log.Logger) tea.Cmd

func GetUserAssoc

func GetUserAssoc(u string, l *log.Logger) tea.Cmd

GetUserAssoc returns a list of associations between current username and slurm accounts. Used later in sacct --json call to fetch users job history

func GetUserName

func GetUserName(l *log.Logger) tea.Cmd

GetUserName returns the linux username string. Used to call sacctmgr and fetch users associations.

func NewCmdCC

func NewCmdCC(config config.ConfigContainer)

NewCmdCC sets the package variable ConfigContainer to the values from config files/defaults. To be used in the package locally without being passed around. Not the smartest choice, consider refactoring later.

Types

type ErrorMsg

type ErrorMsg struct {
	From    string
	ErrHelp string
	OrigErr error
}

type SBatchSent

type SBatchSent struct {
	JobFile string
}

type SHoldSent

type SHoldSent struct {
	Jobid string
}

type SRequeueSent

type SRequeueSent struct {
	Jobid string
}

type ScancelSent

type ScancelSent struct {
	Jobid string
}

type SshCompleted

type SshCompleted struct {
	SshNode string
}

type UserAssoc

type UserAssoc []string

UserAssoc is a list of associations between current username and slurm accounts.

type UserName

type UserName string

UserName is a linux username string.

Jump to

Keyboard shortcuts

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