chore(gRPC): register new runner

Signed-off-by: Bo-Yi.Wu <[email protected]>
This commit is contained in:
Bo-Yi.Wu authored and Jason Song committed 2022-11-24 15:37:10 +08:00
1 parent a3e9bbed25
commit 449388f3ab
7 files changed
+70 -46

No files matched your search

+10 -2
View File
@@ -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)
}