Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct { Task pythia.Task Input string // Path to the UML executable UmlPath string // Path to the directory containing the environments EnvDir string // Path to the directory containing the tasks TasksDir string // contains filtered or unexported fields }
A Job is the combination of a task and an input. Jobs are executed inside a sandbox.
New jobs shall be created with the NewJob function.
The Job type implements the pythia.Component interface so that a job can be launched from the CLI for debugging purposes.
func NewJob ¶
func NewJob() *Job
NewJob returns a new job, filled with default parameters. To execute the job, Task and Input have to be filled, and Execute() called.
func (*Job) Execute ¶
Execute the job in a sandbox, wait for it to complete (or time out), and return the result.
func (*Job) Run ¶
func (job *Job) Run()
Execute the job when launched from the CLI. The result is shown on stdout.
type Pool ¶
type Pool struct { // Maximum number of sandboxes that may run at the same time Capacity int // Path to the UML executable UmlPath string // Path to the directory containing the environments EnvDir string // Path to the directory containing the tasks TasksDir string // contains filtered or unexported fields }
A Pool is a component that launches sandboxes on the local machine. Each Pool has a limit on the number of sandboxes that can run concurrently.
New pools shall be created by the NewPool function.
A Pool connects to the Queue, advertises its limits, and waits for jobs to execute.
type Queue ¶
type Queue struct { // The maximum number of jobs that can wait to be executed. Capacity int // contains filtered or unexported fields }
The Queue is the central component of Pythia. It receives jobs (tasks with inputs) from front-ends and dispatches them to the sandboxes.
The Queue is the only component listening for connections. All other components connect to it.