1
1
mirror of https://github.com/go-gitea/gitea synced 2025-12-07 13:28:25 +00:00

chore(gRPC): support update stage and step method.

Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi.Wu
2022-09-01 22:05:51 +08:00
committed by Jason Song
parent 68d416bd1b
commit eac6425b2f
4 changed files with 25 additions and 5 deletions

View File

@@ -20,6 +20,7 @@ type Service struct {
runnerv1connect.UnimplementedRunnerServiceHandler
}
// Register for new runner.
func (s *Service) Register(
ctx context.Context,
req *connect.Request[runnerv1.RegisterRequest],
@@ -58,6 +59,7 @@ func (s *Service) Register(
return res, nil
}
// Request requests the next available build stage for execution.
func (s *Service) Request(
ctx context.Context,
req *connect.Request[runnerv1.RequestRequest],
@@ -67,3 +69,21 @@ func (s *Service) Request(
})
return res, nil
}
// Update updates the build stage.
func (s *Service) Update(
ctx context.Context,
req *connect.Request[runnerv1.UpdateRequest],
) (*connect.Response[runnerv1.UpdateResponse], error) {
res := connect.NewResponse(&runnerv1.UpdateResponse{})
return res, nil
}
// UpdateStep updates the build step.
func (s *Service) UpdateStep(
ctx context.Context,
req *connect.Request[runnerv1.UpdateStepRequest],
) (*connect.Response[runnerv1.UpdateStepResponse], error) {
res := connect.NewResponse(&runnerv1.UpdateStepResponse{})
return res, nil
}