mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-30 20:42:54 +09:00
chore(gRPC): initial request method
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
This commit is contained in:
@ -58,14 +58,12 @@ func (s *Service) Register(
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func (s *Service) Accept(
|
||||
func (s *Service) Request(
|
||||
ctx context.Context,
|
||||
req *connect.Request[runnerv1.AcceptRequest],
|
||||
) (*connect.Response[runnerv1.AcceptResponse], error) {
|
||||
log.Info("Request headers: %v", req.Header())
|
||||
res := connect.NewResponse(&runnerv1.AcceptResponse{
|
||||
JobId: 100,
|
||||
req *connect.Request[runnerv1.RequestRequest],
|
||||
) (*connect.Response[runnerv1.RequestResponse], error) {
|
||||
res := connect.NewResponse(&runnerv1.RequestResponse{
|
||||
Stage: &runnerv1.Stage{},
|
||||
})
|
||||
res.Header().Set("Gitea-Version", "runnerv1")
|
||||
return res, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user