tasks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package tasks provides types and functions to execute tasks for implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTaskID

func MakeTaskID(name TaskType, part runners.Part, subparts ...int) string

MakeTaskID returns a unique identifier for a task.

Examples:

MakeTaskID(Test, runners.PartOne, 1) => "Test.1.1"
MakeTaskID(Solve, runners.PartTwo) => "Solve.2"

Types

type Result

type Result struct {
	ID       string
	Type     TaskType
	Part     runners.Part
	SubPart  int
	Status   TaskStatus
	Output   string
	Expected string
	Duration float64
}

type TaskStatus

type TaskStatus int
const (
	StatusInvalid    TaskStatus = iota // Invalid
	StatusPassed                       // Passed
	StatusUnverified                   // Unverified
	StatusFailed                       // Failed
	StatusError                        // Error
)

type TaskType

type TaskType int

TaskType represents the type of task to be executed.

const (
	Invalid   TaskType = iota // invalid
	Solve                     // solve
	Test                      // test
	Benchmark                 // benchmark
	Visualize                 // visualize
)

func ParseTaskID

func ParseTaskID(id string) (TaskType, runners.Part, int)

func StringToTaskType

func StringToTaskType(s string) TaskType

Jump to

Keyboard shortcuts

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