model

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: AGPL-3.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package model defines data types used throughout the application

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	ID             int64
	Name           string
	WorkDir        string
	Niceness       int64
	IOPrio         int64
	ScheduledStart time.Time
	Deadline       time.Time
	TimeStarted    time.Time
	TimeFinished   time.Time
	Env            map[string]string
	Steps          []Step
	CurStep        int64
}

Job is a sequence of commands to be exected.

func (*Job) Equal

func (j *Job) Equal(other any) bool

Equal returns true if the argument is another Job instance and all fields have equal values.

func (*Job) KeyStr

func (j *Job) KeyStr() []byte

KeyStr returns a that contains the Job's ID, for use as a database key.

func (*Job) PrettyPrint

func (j *Job) PrettyPrint() string

PrettyPrint returns a string represantion of the Job intended for a human reader.

func (*Job) Ready

func (j *Job) Ready() bool

Ready returns true if the Job is ready to be exected right now.

type Step

type Step struct {
	Seq          int64 // ???
	Predicate    predicate.ID
	Command      string
	TimeStarted  time.Time
	TimeFinished time.Time
	Status       int
	Stdout       string
	Stderr       string
}

Step defines a command to be executed as part of a Job.

func (*Step) Equal

func (s *Step) Equal(other any) bool

Equal returns true if the argument given is another Step value with the same values field by field.

type WebResponse

type WebResponse struct {
	Status    bool      `json:"status"`
	Timestamp time.Time `json:"timestamp"`
	Message   string    `json:"message"`
	Payload   string    `json:"payload"`
}

WebResponse is the regular content sent in response to Ajax or web service requests.

Directories

Path Synopsis
Package predicate defines constants to identify predicates for Job steps.
Package predicate defines constants to identify predicates for Job steps.

Jump to

Keyboard shortcuts

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