Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknown = errors.New("project unknown error") ErrOwnerNotFound = errors.New("owner not found") ErrExecutorNotFound = errors.New("executor not found") ErrProjectNotFound = errors.New("project not found") ErrTaskNotFound = errors.New("task not found") ErrNotReadyTask = errors.New("ready task not found") ErrNotRunningTask = errors.New("running task not found") ErrTaskNotRunning = errors.New("can't change to stop or error for not running task") )
View Source
var TaskStatus_name = map[int]string{
0: "unknown",
1: "error",
2: "prepare",
3: "ready",
4: "running",
5: "stop",
}
View Source
var TaskStatus_value = map[string]int{
"unknown": 0,
"error": 1,
"prepare": 2,
"ready": 3,
"running": 4,
"stop": 5,
}
Functions ¶
This section is empty.
Types ¶
type ExecutorID ¶
type ExecutorID string
func (ExecutorID) String ¶
func (id ExecutorID) String() string
type Repository ¶
type Repository interface { CreateExecutor(*Executor) (*Executor, error) DeleteExecutorByID(id ExecutorID) error GetExecutorByID(id ExecutorID) (*Executor, error) ListExecutors(id user.UserID) ([]*Executor, error) CreateProject(*Project) (*Project, error) DeleteProjectByID(id ProjectID) error GetProjectByID(id ProjectID) (*Project, error) ListProjects(id user.UserID) ([]*Project, error) CreateTask(task *Task) (*Task, error) DeleteTaskByID(id TaskID) error GetTaskByID(id TaskID) (*Task, error) ListTasksByProjectID(projID ProjectID) ([]*Task, error) UpdateTaskByID(id TaskID, task *Task) (*Task, error) PopReadyTask() (*Task, error) }
type Task ¶
type Task struct { ID TaskID ProjectID ProjectID ExecutorID ExecutorID Name string Status TaskStatus Data []byte }
type TaskStatus ¶
type TaskStatus int
const ( TaskStatus_Unknown TaskStatus = 0 TaskStatus_Error TaskStatus = 1 TaskStatus_Prepare TaskStatus = 2 TaskStatus_Ready TaskStatus = 3 TaskStatus_Running TaskStatus = 4 TaskStatus_Stop TaskStatus = 5 )
func LookupTaskStatus ¶
func LookupTaskStatus(s string) TaskStatus
func (TaskStatus) String ¶
func (x TaskStatus) String() string
Click to show internal directories.
Click to hide internal directories.