mirror of
https://gitea.com/gitea/act_runner.git
synced 2025-06-12 17:47:14 +02:00
chore(gRPC): register new runner
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
This commit is contained in:
@ -6,11 +6,19 @@ import (
|
||||
runnerv1 "gitea.com/gitea/proto-go/runner/v1"
|
||||
)
|
||||
|
||||
type Filter struct {
|
||||
Kind string `json:"kind"`
|
||||
Type string `json:"type"`
|
||||
OS string `json:"os"`
|
||||
Arch string `json:"arch"`
|
||||
Capacity int `json:"capacity"`
|
||||
}
|
||||
|
||||
// A Client manages communication with the runner.
|
||||
type Client interface {
|
||||
// Ping sends a ping message to the server to test connectivity.
|
||||
Ping(ctx context.Context, machine string) error
|
||||
|
||||
// Request requests the next available build stage for execution.
|
||||
Request(ctx context.Context) (*runnerv1.Stage, error)
|
||||
// Register for new runner.
|
||||
Register(ctx context.Context, args *runnerv1.RegisterRequest) (*runnerv1.Runner, error)
|
||||
}
|
||||
|
Reference in New Issue
Block a user