Documentation ¶
Index ¶
- Variables
- func Proxy(recvSend func() error) (err error)
- func ProxyBidi(requestFunc func() error, requestStream CloseSender, responseFunc func() error) error
- func SetHeaders(ctx context.Context, repo *gitalypb.Repository) (context.Context, error)
- func SetHeadersWithoutRepoCheck(ctx context.Context, repo *gitalypb.Repository) (context.Context, error)
- type CloseSender
- type Server
- func (s *Server) BlobServiceClient(ctx context.Context) (gitalypb.BlobServiceClient, error)
- func (s *Server) CommitServiceClient(ctx context.Context) (gitalypb.CommitServiceClient, error)
- func (s *Server) ConflictsServiceClient(ctx context.Context) (gitalypb.ConflictsServiceClient, error)
- func (s *Server) DiffServiceClient(ctx context.Context) (gitalypb.DiffServiceClient, error)
- func (s *Server) OperationServiceClient(ctx context.Context) (gitalypb.OperationServiceClient, error)
- func (s *Server) RefServiceClient(ctx context.Context) (gitalypb.RefServiceClient, error)
- func (s *Server) RemoteServiceClient(ctx context.Context) (gitalypb.RemoteServiceClient, error)
- func (s *Server) RepositoryServiceClient(ctx context.Context) (gitalypb.RepositoryServiceClient, error)
- func (s *Server) Stop()
- func (s *Server) WikiServiceClient(ctx context.Context) (gitalypb.WikiServiceClient, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ConnectTimeout is the timeout for establishing a connection to the gitaly-ruby process. ConnectTimeout = 40 * time.Second )
var ProxyHeaderWhitelist = []string{"gitaly-servers"}
ProxyHeaderWhitelist is the list of http/2 headers that will be forwarded as-is to gitaly-ruby.
Functions ¶
func Proxy ¶ added in v0.31.0
Proxy calls recvSend until it receives an error. The error is returned to the caller unless it is io.EOF.
func ProxyBidi ¶ added in v0.45.0
func ProxyBidi(requestFunc func() error, requestStream CloseSender, responseFunc func() error) error
ProxyBidi works like Proxy but runs multiple callbacks simultaneously. It returns immediately if proxying one of the callbacks fails. If the response stream is done, ProxyBidi returns immediately without waiting for the client stream to finish proxying.
func SetHeaders ¶
SetHeaders adds headers that tell gitaly-ruby the full path to the repository.
func SetHeadersWithoutRepoCheck ¶ added in v0.68.0
func SetHeadersWithoutRepoCheck(ctx context.Context, repo *gitalypb.Repository) (context.Context, error)
SetHeadersWithoutRepoCheck adds headers that tell gitaly-ruby the full path to the repository. It is not an error if the repository does not yet exist. This can be used on RPC calls that will create a repository.
Types ¶
type CloseSender ¶ added in v0.45.0
type CloseSender interface {
CloseSend() error
}
CloseSender captures the CloseSend method from gRPC streams.
type Server ¶ added in v0.34.0
type Server struct {
// contains filtered or unexported fields
}
Server represents a gitaly-ruby helper process.
func (*Server) BlobServiceClient ¶ added in v0.71.0
BlobServiceClient returns a BlobServiceClient instance that is configured to connect to the running Ruby server. This assumes Start() has been called already.
func (*Server) CommitServiceClient ¶ added in v0.39.0
CommitServiceClient returns a CommitServiceClient instance that is configured to connect to the running Ruby server. This assumes Start() has been called already.
func (*Server) ConflictsServiceClient ¶ added in v0.60.0
func (s *Server) ConflictsServiceClient(ctx context.Context) (gitalypb.ConflictsServiceClient, error)
ConflictsServiceClient returns a ConflictsServiceClient instance that is configured to connect to the running Ruby server. This assumes Start() has been called already.
func (*Server) DiffServiceClient ¶ added in v0.39.0
DiffServiceClient returns a DiffServiceClient instance that is configured to connect to the running Ruby server. This assumes Start() has been called already.
func (*Server) OperationServiceClient ¶ added in v0.41.0
func (s *Server) OperationServiceClient(ctx context.Context) (gitalypb.OperationServiceClient, error)
OperationServiceClient returns a OperationServiceClient instance that is configured to connect to the running Ruby server. This assumes Start() has been called already.
func (*Server) RefServiceClient ¶ added in v0.39.0
RefServiceClient returns a RefServiceClient instance that is configured to connect to the running Ruby server. This assumes Start() has been called already.
func (*Server) RemoteServiceClient ¶ added in v0.61.0
RemoteServiceClient returns a RemoteServiceClient instance that is configured to connect to the running Ruby server. This assumes Start() has been called already.
func (*Server) RepositoryServiceClient ¶ added in v0.41.0
func (s *Server) RepositoryServiceClient(ctx context.Context) (gitalypb.RepositoryServiceClient, error)
RepositoryServiceClient returns a RefServiceClient instance that is configured to connect to the running Ruby server. This assumes Start() has been called already.
func (*Server) Stop ¶ added in v0.34.0
func (s *Server) Stop()
Stop shuts down the gitaly-ruby helper process and cleans up resources.
func (*Server) WikiServiceClient ¶ added in v0.48.0
WikiServiceClient returns a WikiServiceClient instance that is configured to connect to the running Ruby server. This assumes Start() has been called already.