blob: f2460b8374fa1b26eb7a5774a42941f396c4e185 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
package wiki
import (
"gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/rubyserver"
"gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb"
)
func (s *server) WikiListPages(request *gitalypb.WikiListPagesRequest, stream gitalypb.WikiService_WikiListPagesServer) error {
ctx := stream.Context()
client, err := s.ruby.WikiServiceClient(ctx)
if err != nil {
return err
}
clientCtx, err := rubyserver.SetHeaders(ctx, s.locator, request.GetRepository())
if err != nil {
return err
}
rubyStream, err := client.WikiListPages(clientCtx, request)
if err != nil {
return err
}
return rubyserver.Proxy(func() error {
resp, err := rubyStream.Recv()
if err != nil {
md := rubyStream.Trailer()
stream.SetTrailer(md)
return err
}
return stream.Send(resp)
})
}
|