Documentation ¶
Index ¶
- Constants
- type ArrayJob
- func (aj *ArrayJob) GetID() string
- func (aj *ArrayJob) GetJobTemplate() *JobTemplate
- func (aj *ArrayJob) GetJobs() []Job
- func (aj *ArrayJob) GetSessionName() string
- func (aj *ArrayJob) Hold() error
- func (aj *ArrayJob) Release() error
- func (aj *ArrayJob) Resume() error
- func (aj *ArrayJob) Suspend() error
- func (aj *ArrayJob) Terminate() error
- type CPU
- type CallbackFunction
- type Capability
- type Error
- type Event
- type EventChannel
- type Extensible
- type Extension
- type Job
- func (job *Job) GetId() string
- func (job *Job) GetJobInfo() (*JobInfo, error)
- func (job *Job) GetJobTemplate() (*JobTemplate, error)
- func (job *Job) GetSessionName() string
- func (job *Job) GetState() JobState
- func (job *Job) Hold() error
- func (job *Job) Reap() error
- func (job *Job) Release() error
- func (job *Job) Resume() error
- func (job *Job) Suspend() error
- func (job *Job) Terminate() error
- func (job *Job) TerminateForced() error
- func (job *Job) WaitStarted(timeout int64) error
- func (job *Job) WaitTerminated(timeout int64) error
- type JobInfo
- type JobSession
- func (js *JobSession) Close() error
- func (js *JobSession) GetContact() (string, error)
- func (js *JobSession) GetJobArray(id string) (*ArrayJob, error)
- func (js *JobSession) GetJobCategories() ([]string, error)
- func (js *JobSession) GetJobs(ji *JobInfo) ([]Job, error)
- func (js *JobSession) GetSessionName() (string, error)
- func (js *JobSession) RunBulkJobs(jt JobTemplate, begin int, end int, step int, maxParallel int) (*ArrayJob, error)
- func (js *JobSession) RunJob(jt JobTemplate) (*Job, error)
- func (js *JobSession) WaitAnyStarted(jobs []Job, timeout int64) (*Job, error)
- func (js *JobSession) WaitAnyTerminated(jobs []Job, timeout int64) (*Job, error)
- type JobState
- type JobTemplate
- type Machine
- type MonitoringSession
- func (ms *MonitoringSession) CloseMonitoringSession() error
- func (ms *MonitoringSession) GetAllJobs(ji *JobInfo) (jobs []Job, err error)
- func (ms *MonitoringSession) GetAllMachines(names []string) (machines []Machine, err error)
- func (ms *MonitoringSession) GetAllQueues(names []string) (queues []Queue, err error)
- func (ms *MonitoringSession) GetAllReservations() (reservations []Reservation, err error)
- type Notification
- type OS
- type Queue
- type Reservation
- type ReservationInfo
- type ReservationSession
- func (rs *ReservationSession) Close() error
- func (rs *ReservationSession) GetContact() (string, error)
- func (rs *ReservationSession) GetReservation(rid string) (*Reservation, error)
- func (rs *ReservationSession) GetReservations() ([]Reservation, error)
- func (rs *ReservationSession) GetSessionName() (string, error)
- func (rs *ReservationSession) RequestReservation(rtemplate ReservationTemplate) (*Reservation, error)
- type ReservationTemplate
- type SessionManager
- func (sm *SessionManager) CreateJobSession(sessionName, contact string) (*JobSession, error)
- func (sm *SessionManager) CreateReservationSession(sessionName, contact string) (rs *ReservationSession, err error)
- func (sm *SessionManager) DestroyJobSession(sessionName string) error
- func (sm *SessionManager) DestroyReservationSession(sessionName string) error
- func (sm *SessionManager) GetDrmsName() (string, error)
- func (sm *SessionManager) GetDrmsVersion() (*Version, error)
- func (sm *SessionManager) GetJobSessionNames() ([]string, error)
- func (sm *SessionManager) GetReservationSessionNames() ([]string, error)
- func (sm *SessionManager) OpenJobSession(sessionName string) (*JobSession, error)
- func (sm *SessionManager) OpenMonitoringSession(sessionName string) (*MonitoringSession, error)
- func (sm *SessionManager) OpenReservationSession(name string) (rs ReservationSession, err error)
- func (sm *SessionManager) RegisterEventNotification() (EventChannel, error)
- func (sm *SessionManager) Supports(c Capability) bool
- func (sm *SessionManager) UnregisterEventNotification() error
- type SlotInfo
- type Version
Constants ¶
const ( AdvanceReservation = iota ReserveSlots Callback BulkJobsMaxParallel JtEmail JtStaging JtDeadline JtMaxSlots JtAccountingId RtStartNow RtDuration RtMachineOS RtMachineArch )
const ( Success errorID = iota DeniedByDrms DrmCommunication TryLater SessionManagement Timeout Internal InvalidArgument InvalidSession InvalidState OutOfResource UnsupportedAttribute UnsupportedOperation ImplementationSpecific LastError )
const ( NewState = iota Migrated AttributeChange )
const InfiniteTime = int64(C.DRMAA2_INFINITE_TIME)
InfiniteTime is a special timeout value: Wait probably infinitly
const UnsetTime = int64(C.DRMAA2_UNSET_TIME)
UnsetTime is a special time value: Time or date not set
const ZeroTime = int64(C.DRMAA2_ZERO_TIME)
ZeroTime is a special timeout value: Don't wait
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayJob ¶
type ArrayJob struct {
// contains filtered or unexported fields
}
ArrayJob represents a DRMAA2 job array. Basically a super-job which contains lots of jobs called tasks. All tasks share the same property (process name / arguments etc). The tasks can differentiate between themselfs by reading out a specific environment variable.
func (*ArrayJob) GetJobTemplate ¶
func (aj *ArrayJob) GetJobTemplate() *JobTemplate
GetJobTemplate returns a pointer to a job template of the ArrayJob.
func (*ArrayJob) GetSessionName ¶
GetSessionName returns the name of the job session the array job belongs to.
func (*ArrayJob) Release ¶
Release releases all tasks of an ArrayJob from hold, if they are on hold.
type CPU ¶
type CPU int
CPU architecture types
const ( // OtherCPU is an unknown CPU type OtherCPU CPU = iota // Alpha is Alpha CPU Alpha // ARM is a 32bit ARM (ARM6, ARM7) type ARM // ARM64 is a 64bit ARM (ARM8) type ARM64 // Cell is the Cell architecture (PS3) Cell // PA_RISC is the HP RISC architecture PA_RISC // PA_RISC64 is the HP RISC architecture 64bit version PA_RISC64 // IA_64 is the Intel 64bit architecture IA_64 // MIPS is 32bit MIPS MIPS // MIPS64 is 64bit MIPS MIPS64 // PowerPC is the 32bit PowerPC architecture PowerPC // PowerPC64 is the 64bit PowerPC architecture PowerPC64 // SPARC is the 32bit SPARC architecture SPARC // SPARC64 is the 64bit SPARC architecture SPARC64 )
type CallbackFunction ¶
type CallbackFunction func(notification Notification)
CallbackFunction is function which works on the notification struct as callback.
type Capability ¶
type Capability int
Capability is a type which represents the availability of optional functionality of the DRMAA2 implementation. Option functionality is defined by the DRMAA2 standard but not mandatory to implement.
type Error ¶
type Error struct { Message string ID errorID }
Error is a DRMAA2 error (implements Go Error interface).
type EventChannel ¶
type EventChannel chan Notification
type Extensible ¶
type Extensible interface { // ListExtensions Lists all implementation specific key names for // a particular DRMAA2 extensible data type ListExtensions() []string // DescribeExtension describes the semantic of an extension DescribeExtension(string) string // SetExtension sets value in a extension SetExtension(string) error // GetExtension returns the value of an extension GetExtension() string }
Extensible is an interface which defines functions used to interact with extensible data structures (JobTemplate, JobInfo etc.).
type Extension ¶
type Extension struct { // SType stores the type of the structure to extent SType structType // Internal is a pointer to the enhacement of the C struct (void *) Internal unsafe.Pointer // ExtensionList caches the extension requests in a map ExtensionList map[string]string }
Extension is a struct which is embedded in DRMAA2 objects which are extensible.
type Job ¶
type Job struct {
// contains filtered or unexported fields
}
Job is a struct which represents a job in the DRM system (part of a JobSession or a Monitoring session).
func (*Job) GetJobInfo ¶
GetJobInfo creates a new JobInfo object out of the job.
func (*Job) GetJobTemplate ¶
func (job *Job) GetJobTemplate() (*JobTemplate, error)
Returns the JobTemplate used to submit the job.
func (*Job) GetSessionName ¶
A job session name is a (per user) unique identifier of the job session. It is stored in the cluster scheduler or in the underlying DRMAA2 C implementation. It is persistent until it gets reaped by DestroyJobSession() method.
func (*Job) Hold ¶
Hold set the job into an hold state so that it is not scheduled. If the job is already running it continues to run and the hold state becomes only effectice when the job is rescheduled.
func (*Job) Reap ¶
Reap removes a finished job from internal storage. Without calling Reap() the job will be listed in the jobs session and monitoring session as finished job until the sessions are closed. Reaping jobs makes sense to avoid out of memory conditions. (Remark Reap() came in DRMAA2 2015 Errata)
func (*Job) Release ¶
Release removes the hold state from the job so that it will be considered as a schedulable job.
func (*Job) Resume ¶
Resume continues to run a job / process (typically a SIGCONT signal is sent to the job / process).
func (*Job) Suspend ¶
Stops a job / process from beeing executed (typically a SIGSTOP or SIGTSTP signal is sent to the job / process).
func (*Job) TerminateForced ¶
Terminate tells the resource manager to kill the job.
func (*Job) WaitStarted ¶
Blocking wait until the job is started. The timeout prefents that the call is blocking endlessly. Special timeouts are available by the constants InfiniteTime and ZeroTime.
func (*Job) WaitTerminated ¶
WaitTerminated wait until the job goes into one of the finished states. The timeout specifies the maximum time to wait. If no timeout is required use the constant drmaa2.InfiniteTime.
type JobInfo ¶
type JobInfo struct { // reference to the void* pointer which // is used for extensions Extension `xml:"-" json:"-"` Id string `json:"id"` JobName string `json:"jobName"` ExitStatus int `json:"exitStatus"` TerminatingSignal string `json:"terminationSignal"` Annotation string `json:"annotation"` State JobState `json:"state"` SubState string `json:"subState"` AllocatedMachines []SlotInfo `json:"allocatedMachines"` SubmissionMachine string `json:"submissionMachine"` JobOwner string `json:"jobOwner"` Slots int64 `json:"slots"` QueueName string `json:"queueName"` WallclockTime time.Duration `json:"wallockTime"` CPUTime int64 `json:"cpuTime"` SubmissionTime time.Time `json:"submissionTime"` DispatchTime time.Time `json:"dispatchTime"` FinishTime time.Time `json:"finishTime"` }
JobInfo is a struct which represents the current state of a job.
func CreateJobInfo ¶
func CreateJobInfo() (ji JobInfo)
CreateJobInfo creates a JobInfo object where all values are initialized with UNSET (needed in order to differentiate if a value is not set or 0).
func (*JobInfo) ListExtensions ¶
ListExtensions returns a string list containing all implementation specific extensions of the JobInfo object.
func (*JobInfo) SetExtension ¶
SetExtension adds an vendor specific attribute to the extensible structure.
type JobSession ¶
type JobSession struct { Name string `json:"name"` // public name of job session // contains filtered or unexported fields }
JobSession is a struct which represents a DRMAA2 job session for job submission and job management.
func (*JobSession) Close ¶
func (js *JobSession) Close() error
Close closes the connection to an open JobSession.
func (*JobSession) GetContact ¶
func (js *JobSession) GetContact() (string, error)
GetContact returns the contact string of the DRM session.
func (*JobSession) GetJobArray ¶
func (js *JobSession) GetJobArray(id string) (*ArrayJob, error)
GetJobArray returns a reference to an existing ArrayJob based on the given job id. In case of an error the error return value is set to != nil.
func (*JobSession) GetJobCategories ¶
func (js *JobSession) GetJobCategories() ([]string, error)
GetJobCategories returns all job categories specified in the job session or globally.
func (*JobSession) GetJobs ¶
func (js *JobSession) GetJobs(ji *JobInfo) ([]Job, error)
GetJobs returns a list of all jobs currently attached to the given JobSession. If a JobInfo argument unequal nil is given then this JobInfo element is used for filtering the result. For more details about filtering consider the details of the DRMAA2 specificaton.
func (*JobSession) GetSessionName ¶
func (js *JobSession) GetSessionName() (string, error)
GetSessionName returns the session name of the JobSession struct which also can be used directly.
func (*JobSession) RunBulkJobs ¶
func (js *JobSession) RunBulkJobs(jt JobTemplate, begin int, end int, step int, maxParallel int) (*ArrayJob, error)
RunBulkJobs submits a JobTemplate to the cluster as an array job (multiple instances of the same job, not neccessarly running a the same point in time). It requires a JobTemplate filled out at least with a RemoteCommand. The begin, end and step parameters specifying how many array job instances are submitted and how the instances are numbered (1,10,1 denotes 10 array job instances numbered from 1 to 10). The maxParallel parameter specifies how many of the array job instances should run at parallel as maximum (when resources are contrainted then less instances could run).
func (*JobSession) RunJob ¶
func (js *JobSession) RunJob(jt JobTemplate) (*Job, error)
RunJob submits a job based on the parameters specified in the JobTemplate in the cluster. In case of success it returns a pointer to a Job element, which can be used for further processing. In case of an error the error return value is set.
func (*JobSession) WaitAnyStarted ¶
func (js *JobSession) WaitAnyStarted(jobs []Job, timeout int64) (*Job, error)
WaitAnyStarted waits until any of the given jobs is started (usually in running state). The timeout determines after how many seconds the method should abort, even when none of the given jobs was started. Special timeout values are InfiniteTime and ZeroTime.
func (*JobSession) WaitAnyTerminated ¶
func (js *JobSession) WaitAnyTerminated(jobs []Job, timeout int64) (*Job, error)
WaitAnyTerminated waits until any of the given jobs is finished. The timeout determines after how many seconds the method should abort, even when none of the given jobs is finished. Sepecial timeout values are InfiniteTime and ZeroTime.
type JobState ¶
type JobState int
JobState represents a DRMAA2 job state
const ( // Unset is no job state (used as JobInfo filter for matching all states // for example) Unset JobState = iota // Undetermined is an unknown state of the job Undetermined // Queued means the job is waiting Queued // QueuedHeld means the job is waiting and not eligible to run QueuedHeld // Running means the job is actually running Running // Suspended means the job was running but now in a suspended state Suspended // Requeued means the job was running and then stopped and now waiting // again for being scheduled. Requeued // ReuquedHeld means the job was requeued but has a hold flag set RequeuedHeld // Done means the job finished without an error (exit code 0) Done // Failed means that the job finished with an error Failed )
type JobTemplate ¶
type JobTemplate struct { Extension `xml:"-" json:"-"` RemoteCommand string `json:"remoteCommand"` Args []string `json:"args"` SubmitAsHold bool `json:"submitAsHold"` ReRunnable bool `json:"reRunnable"` JobEnvironment map[string]string `json:"jobEnvironment"` WorkingDirectory string `json:"workingDirectory"` JobCategory string `json:"jobCategory"` Email []string `json:"email"` EmailOnStarted bool `json:"emailOnStarted"` EmailOnTerminated bool `json:"emailOnTerminated"` JobName string `json:"jobName"` InputPath string `json:"inputPath"` OutputPath string `json:"outputPath"` ErrorPath string `json:"errorPath"` JoinFiles bool `json:"joinFiles"` ReservationId string `json:"reservationId"` QueueName string `json:"queueName"` MinSlots int64 `json:"minSlots"` MaxSlots int64 `json:"maxSlots"` Priority int64 `json:"priority"` CandidateMachines []string `json:"candidateMachines"` MinPhysMemory int64 `json:"minPhysMemory"` MachineOs string `json:"machineOs"` MachineArch string `json:"machineArch"` StartTime time.Time `json:"startTime"` DeadlineTime time.Time `json:"deadlineTime"` StageInFiles map[string]string `json:"stageInFiles"` StageOutFiles map[string]string `json:"stageOutFiles"` ResourceLimits map[string]string `json:"resourceLimits"` AccountingId string `json:"accountingString"` }
JobTemplate is the template for creating a job out of it.
func (*JobTemplate) DescribeExtension ¶
func (jt *JobTemplate) DescribeExtension(extensionName string) (string, error)
DescribeExtension returns the description of an implementation specific JobTemplate extension as a string.
func (*JobTemplate) ListExtensions ¶
func (jt *JobTemplate) ListExtensions() []string
ListExtensions returns a string list containing all implementation specific extensions of the JobTemplate object.
func (*JobTemplate) SetExtension ¶
func (jt *JobTemplate) SetExtension(extension, value string) error
SetExtension adds an vendor specific attribute to the extensible structure.
type Machine ¶
type Machine struct { // Extension is embedded in a machine since it is extensible. Extension `xml:"-" json:"-"` // Name is the name of the compute node. Name string `json:"name"` // Available determines if the machine can accept jobs. Available bool `json:"available"` // Sockets is the amount of CPU packages installed on the compute node. Sockets int64 `json:"sockets"` // CoresPerSocket represents the amount of cores per socket. CoresPerSocket int64 `json:"coresPerSocket"` // ThreadsPerCore specifies how SMT threads are supported per core. ThreadsPerCore int64 `json:"threadsPerCore"` // Load is the 5 min. load average of the compute node. Load float64 `json:"load"` PhysicalMemory int64 `json:"physicalMemory"` VirtualMemory int64 `json:"virtualMemory"` Architecture CPU `json:"architecture"` OSVersion Version `json:"osVersion"` OS OS `json:"os"` }
Machine is a host where jobs can be executed.
func (*Machine) ListExtensions ¶
ListExtensions returns a string list containing all implementation specific extensions of the Machine object.
func (*Machine) SetExtension ¶
SetExtension adds an vendor specific attribute to the extensible structure.
type MonitoringSession ¶
type MonitoringSession struct {
// contains filtered or unexported fields
}
MonitoringSession is a struct which represents a DRMAA2 monitoring session (for cluster monitoring).
func (*MonitoringSession) CloseMonitoringSession ¶
func (ms *MonitoringSession) CloseMonitoringSession() error
CloseMonitoringSession closes the MonitoringSession.
func (*MonitoringSession) GetAllJobs ¶
func (ms *MonitoringSession) GetAllJobs(ji *JobInfo) (jobs []Job, err error)
GetAllJobs returns a slice of jobs currently visible in the monitoring session. The JobInfo parameter specifies a filter for the job. For instance when a certain job number is set in the JobInfo object, then
func (*MonitoringSession) GetAllMachines ¶
func (ms *MonitoringSession) GetAllMachines(names []string) (machines []Machine, err error)
GetAllMachines returns a list of all machines configured in cluster if the argument is nil. Otherwise a list of available machines which matches the given names is returned.
func (*MonitoringSession) GetAllQueues ¶
func (ms *MonitoringSession) GetAllQueues(names []string) (queues []Queue, err error)
GetlAllQueues returns all queues configured in the cluster in case the argument is nil. Otherwise as subset of the queues which matches the given names is returned.
func (*MonitoringSession) GetAllReservations ¶
func (ms *MonitoringSession) GetAllReservations() (reservations []Reservation, err error)
GetAllReservations returns all known advance reservations.
type Notification ¶
type Notification struct { Evt Event `json:"event"` JobId string `json:"jobId"` SessionName string `json:"sessionName"` State JobState `json:"jobState"` }
Notification represents a JobStatus change event.
type Queue ¶
type Queue struct { // Extension is embedded in a queue since it is extensible. Extension `xml:"-" json:"-"` // Name is the name of the queue. Name string `xml:"name"` }
Queue represents a queue of the Distribute Resource Manager. In Grid Engine a queue defines the execution context of a job, it is not a waiting queue.
func (*Queue) ListExtensions ¶
ListExtensions returns a string list containing all implementation specific extensions of the Queue object.
func (*Queue) SetExtension ¶
SetExtension adds an vendor specific attribute to the extensible structure.
type Reservation ¶
type Reservation struct { SessionName string `json:"sessionName"` Contact string `json:"contact"` Template ReservationTemplate `json:"template"` ReservationId string `json:"reservationId"` }
Reservation represents a advance reservation in the Distributed Resource Management system.
func (*Reservation) GetID ¶
func (r *Reservation) GetID() (string, error)
GetID Returns the advance reservation id. TODO(dg)
func (*Reservation) GetInfo ¶
func (r *Reservation) GetInfo() (*ReservationInfo, error)
GetInfo returns the reservation info object of the reservation. TODO(dg)
func (*Reservation) GetSessionName ¶
func (r *Reservation) GetSessionName() (string, error)
GetSessionName returns the name of the reservation. TODO(dg)
func (*Reservation) GetTemplate ¶
func (r *Reservation) GetTemplate() (*ReservationTemplate, error)
GetTemplate returns the reservation template of the reservation. TODO(dg)
func (*Reservation) Terminate ¶
func (r *Reservation) Terminate() error
Terminate cancels an advance reservation. TODO(dg)
type ReservationInfo ¶
type ReservationInfo struct { ReservationId string `json:"reservationId"` ReservationName string `json:"reservationName"` ReservationStartTime time.Time `json:"reservationStartTime"` ReservationEndTime time.Time `json:"reservationEndTime"` ACL []string `json:"acl"` ReservedSlots int64 `json:"reservedSlots"` ReservedMachines []string `json:"reservedMachines"` }
ReservationInfo is a struct which represents a reservation.
type ReservationSession ¶
type ReservationSession struct { Name string `json:"name"` // contains filtered or unexported fields }
ReservationSession is a struct which represents a DRMAA reservation session for handling advance reservations. The support for reservation sessions is optional in the DRMAA2 standard.
func (*ReservationSession) Close ¶
func (rs *ReservationSession) Close() error
Close closes an open ReservationSession.
func (*ReservationSession) GetContact ¶
func (rs *ReservationSession) GetContact() (string, error)
GetContact returns the contact string of the reservation session.
func (*ReservationSession) GetReservation ¶
func (rs *ReservationSession) GetReservation(rid string) (*Reservation, error)
GetReservation returns a reservation object based on the advance reservation ID. TODO(dg)
func (*ReservationSession) GetReservations ¶
func (rs *ReservationSession) GetReservations() ([]Reservation, error)
GetReservations returns a list of available advance reservations. TODO(dg)
func (*ReservationSession) GetSessionName ¶
func (rs *ReservationSession) GetSessionName() (string, error)
GetSessionName returns the name of the reservation session. TODO(dg)
func (*ReservationSession) RequestReservation ¶
func (rs *ReservationSession) RequestReservation(rtemplate ReservationTemplate) (*Reservation, error)
RequestReservation allocates an advance reservation based on the reservation template. TODO(dg)
type ReservationTemplate ¶
type ReservationTemplate struct { Extension `xml:"-" json:"-"` Name string `json:"name"` StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` Duration time.Duration `json:"duration"` MinSlots int64 `json:"minSlots"` MaxSlots int64 `json:"maxSlots"` JobCategory string `json:"jobCategory"` UsersACL []string `json:"userACL"` CandidateMachines []string `json:"candidateMachines"` MinPhysMemory int64 `json:"minPhysMemory"` MachineOs string `json:"machineOs"` MachineArch string `json:"machineArch"` }
ReservationTemplate is a template from which a reservation can be generated.
type SessionManager ¶
type SessionManager struct { }
SessionManager is a utility function for creating monitoring sessions and Job Sessions A Create Method which initializes the values and also does initialization about capabilities, versions etc. ?!? TODO(dg)
func (*SessionManager) CreateJobSession ¶
func (sm *SessionManager) CreateJobSession(sessionName, contact string) (*JobSession, error)
CreateJobSession creates a new persistent job session and opens it. The returned JobSession object contains a reference to a DRMAA2 C jobsession object and hence needs to be freed manually.
func (*SessionManager) CreateReservationSession ¶
func (sm *SessionManager) CreateReservationSession(sessionName, contact string) (rs *ReservationSession, err error)
CreateReservationSessiono creates a reservation session by name and contact string.
func (*SessionManager) DestroyJobSession ¶
func (sm *SessionManager) DestroyJobSession(sessionName string) error
DestroyJobSession destroys a job session by name.
func (*SessionManager) DestroyReservationSession ¶
func (sm *SessionManager) DestroyReservationSession(sessionName string) error
DestroyReservationSession destroys a reservation by name.
func (*SessionManager) GetDrmsName ¶
func (sm *SessionManager) GetDrmsName() (string, error)
GetDrmsName returns the name of the Distributed Resource Management System.
func (*SessionManager) GetDrmsVersion ¶
func (sm *SessionManager) GetDrmsVersion() (*Version, error)
GetDrmsVersion returns the version of the Distributed Resource Management System.
func (*SessionManager) GetJobSessionNames ¶
func (sm *SessionManager) GetJobSessionNames() ([]string, error)
GetJobSessionNames returns all job sessions accessable to the user.
func (*SessionManager) GetReservationSessionNames ¶
func (sm *SessionManager) GetReservationSessionNames() ([]string, error)
GetReservationSessionNames returns all reservation sessions accessable to the user.
func (*SessionManager) OpenJobSession ¶
func (sm *SessionManager) OpenJobSession(sessionName string) (*JobSession, error)
OpenJobSession opens an existing DRMAA2 job sesssion. In Univa Grid Engine this job session is persistently stored in the Grid Engine master process. The sessionName needs to be != "".
func (*SessionManager) OpenMonitoringSession ¶
func (sm *SessionManager) OpenMonitoringSession(sessionName string) (*MonitoringSession, error)
OpenMonitoringSession opens a MonitoringSession by name. Usually the name is ignored.
func (*SessionManager) OpenReservationSession ¶
func (sm *SessionManager) OpenReservationSession(name string) (rs ReservationSession, err error)
OpenReservationSession opens an existing ReservationSession by name.
func (*SessionManager) RegisterEventNotification ¶
func (sm *SessionManager) RegisterEventNotification() (EventChannel, error)
RegisterEventNotification needs to install a C callback in the C interface. TODO(dg)
func (*SessionManager) Supports ¶
func (sm *SessionManager) Supports(c Capability) bool
Supports checks whether the DRMAA2 implementation supports an optional functionality or not.
func (*SessionManager) UnregisterEventNotification ¶
func (sm *SessionManager) UnregisterEventNotification() error
UnregisterEventNotification turns off sending events through the EventChannel. Internally a NULL callback is registered so that no new events are created. TODO(dg)