tasks

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Controller

type Controller interface {
	GetTasks(c *gin.Context)
	GetTask(c *gin.Context)
	UpdateTask(c *gin.Context)
	ReserveTask(c *gin.Context)
}

func NewController

func NewController(logger *zap.Logger, s Service) Controller

type DefaultController

type DefaultController struct {
	// contains filtered or unexported fields
}

func (*DefaultController) GetTask

func (d *DefaultController) GetTask(c *gin.Context)

func (*DefaultController) GetTasks

func (d *DefaultController) GetTasks(c *gin.Context)

func (*DefaultController) ReserveTask

func (d *DefaultController) ReserveTask(c *gin.Context)

func (*DefaultController) UpdateTask

func (d *DefaultController) UpdateTask(c *gin.Context)

type InitTaskGroupFn

type InitTaskGroupFn func(r *gin.RouterGroup)

func CreateInitControllersFn

func CreateInitControllersFn(jc Controller, hub *ws.Hub) InitTaskGroupFn

type Service

type Service interface {
	GetTasks(taskType string) (task []*models.Task, err error)
	GetTask(taskId string) (task *models.Task, err error)
	UpdateTask(taskId, warning, error string, outputs *models.Slots) (task *models.Task, err error)
	ReserveTask(taskId string) (token string, locked bool, err error)
}

func NewService

func NewService(
	logger *zap.Logger,
) Service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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