Documentation ¶
Index ¶
- Variables
- func ConstString(element *ProcessElement) (bool, error)
- func Evaluate(element *ProcessElement) (bool, error)
- func File(element *ProcessElement) (bool, error)
- func String(element *ProcessElement) (bool, error)
- type Controller
- type DefaultController
- type InitProcessGroupFn
- type ProcessElement
- type ProcessManager
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(CreateInitControllersFn, NewController, NewService, NewManager, )
Functions ¶
func ConstString ¶ added in v0.0.12
func ConstString(element *ProcessElement) (bool, error)
func Evaluate ¶ added in v0.0.12
func Evaluate(element *ProcessElement) (bool, error)
func File ¶ added in v0.0.12
func File(element *ProcessElement) (bool, error)
func String ¶ added in v0.0.12
func String(element *ProcessElement) (bool, error)
Types ¶
type Controller ¶
type Controller interface { GetProcesses(c *gin.Context) GetProcess(c *gin.Context) UpdateProcess(c *gin.Context) ReserveProcess(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) GetProcess ¶
func (d *DefaultController) GetProcess(c *gin.Context)
func (*DefaultController) GetProcesses ¶ added in v0.0.12
func (d *DefaultController) GetProcesses(c *gin.Context)
func (*DefaultController) ReserveProcess ¶ added in v0.0.12
func (d *DefaultController) ReserveProcess(c *gin.Context)
func (*DefaultController) UpdateProcess ¶ added in v0.0.12
func (d *DefaultController) UpdateProcess(c *gin.Context)
type InitProcessGroupFn ¶
type InitProcessGroupFn func(r *gin.RouterGroup)
func CreateInitControllersFn ¶
func CreateInitControllersFn(jc Controller) InitProcessGroupFn
type ProcessElement ¶ added in v0.0.12
type ProcessManager ¶ added in v0.0.12
type ProcessManager interface { List() Push(blockId int, process *models.Process) <-chan *models.Slots Fetch(judgementId, processId, processType string, ignoreLock bool) *ProcessElement Finish(element *ProcessElement, slots *models.Slots) error FinishWithError(element *ProcessElement, message string) error Reserve(element *ProcessElement) bool }
func GetManager ¶ added in v0.0.12
func GetManager() ProcessManager
func NewManager ¶ added in v0.0.12
func NewManager(logger *zap.Logger) ProcessManager
type Service ¶
type Service interface { GetProcesses(processType string) (process []*models.Process, err error) GetProcess(processId string) (process *models.Process, err error) UpdateProcess(processId, warning, error string, outputs *models.Slots) (process *models.Process, err error) ReserveProcess(processId string) (token string, locked bool, err error) }
func NewService ¶
func NewService(logger *zap.Logger, manager ProcessManager) Service
Click to show internal directories.
Click to hide internal directories.