rubyserver

package
v15.10.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConnectTimeout = 40 * time.Second

ConnectTimeout is the timeout for establishing a connection to the gitaly-ruby process.

Functions

func Proxy

func Proxy(recvSend func() error) (err error)

Proxy calls recvSend until it receives an error. The error is returned to the caller unless it is io.EOF.

func SetHeaders

func SetHeaders(ctx context.Context, locator storage.Locator, repo *gitalypb.Repository) (context.Context, error)

SetHeaders adds headers that tell gitaly-ruby the full path to the repository.

Types

type CloseSender

type CloseSender interface {
	CloseSend() error
}

CloseSender captures the CloseSend method from gRPC streams.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents a gitaly-ruby helper process.

func New

func New(cfg config.Cfg, gitCmdFactory git.CommandFactory) *Server

New returns a new instance of the server.

func (*Server) RepositoryServiceClient

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) Start

func (s *Server) Start() error

Start spawns the Ruby server.

func (*Server) Stop

func (s *Server) Stop()

Stop shuts down the gitaly-ruby helper process and cleans up resources.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL