mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-22 08:34:05 +09:00
chore(gRPC): handle requesut for stage data
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
This commit is contained in:
24
routers/api/bots/core/scheduler.go
Normal file
24
routers/api/bots/core/scheduler.go
Normal file
@ -0,0 +1,24 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
runnerv1 "gitea.com/gitea/proto-go/runner/v1"
|
||||
)
|
||||
|
||||
type Filter struct {
|
||||
Kind string
|
||||
Type string
|
||||
OS string
|
||||
Arch string
|
||||
Kernel string
|
||||
}
|
||||
|
||||
// Scheduler schedules Build stages for execution.
|
||||
type Scheduler interface {
|
||||
// Schedule schedules the stage for execution.
|
||||
Schedule(context.Context, *runnerv1.Stage) error
|
||||
|
||||
// Request requests the next stage scheduled for execution.
|
||||
Request(context.Context, Filter) (*runnerv1.Stage, error)
|
||||
}
|
Reference in New Issue
Block a user