chore(runner): support update log and task

Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi.Wu
2022-09-25 18:54:00 +08:00
committed by Jason Song
parent 20c3d85ba9
commit 82431d8e11
11 changed files with 489 additions and 375 deletions

View File

@ -1,9 +1,8 @@
package client
import (
"context"
runnerv1 "gitea.com/gitea/proto-go/runner/v1"
"gitea.com/gitea/proto-go/ping/v1/pingv1connect"
"gitea.com/gitea/proto-go/runner/v1/runnerv1connect"
)
type Filter struct {
@ -16,21 +15,6 @@ type Filter struct {
// 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
// Register for new runner.
Register(ctx context.Context, args *runnerv1.RegisterRequest) (*runnerv1.Runner, error)
// Request requests the next available build stage for execution.
Request(ctx context.Context, args *runnerv1.RequestRequest) (*runnerv1.Stage, error)
// Detail fetches build details
Detail(ctx context.Context, args *runnerv1.DetailRequest) (*runnerv1.DetailResponse, error)
// Update updates the build stage.
Update(ctxt context.Context, args *runnerv1.UpdateRequest) error
// UpdateStep updates the build step.
UpdateStep(ctx context.Context, args *runnerv1.UpdateStepRequest) error
pingv1connect.PingServiceClient
runnerv1connect.RunnerServiceClient
}