Documentation
¶
Index ¶
- func New(secure bool, cfg config.Cfg, logrusEntry *log.Entry, ...) (*grpc.Server, error)
- type GitalyServerFactory
- func (s *GitalyServerFactory) CreateExternal(secure bool) (*grpc.Server, error)
- func (s *GitalyServerFactory) CreateInternal() (*grpc.Server, error)
- func (s *GitalyServerFactory) GracefulStop()
- func (s *GitalyServerFactory) StartWorkers(ctx context.Context, l logrus.FieldLogger, cfg config.Cfg) (func(), error)
- func (s *GitalyServerFactory) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GitalyServerFactory ¶
type GitalyServerFactory struct {
// contains filtered or unexported fields
}
GitalyServerFactory is a factory of gitaly grpc servers
func NewGitalyServerFactory ¶
func NewGitalyServerFactory( cfg config.Cfg, logger *logrus.Entry, registry *backchannel.Registry, cacheInvalidator cache.Invalidator, ) *GitalyServerFactory
NewGitalyServerFactory allows to create and start secure/insecure 'grpc.Server'-s with gitaly-ruby server shared in between.
func (*GitalyServerFactory) CreateExternal ¶
func (s *GitalyServerFactory) CreateExternal(secure bool) (*grpc.Server, error)
CreateExternal creates a new external gRPC server. The external servers are closed before the internal servers when gracefully shutting down.
func (*GitalyServerFactory) CreateInternal ¶
func (s *GitalyServerFactory) CreateInternal() (*grpc.Server, error)
CreateInternal creates a new internal gRPC server. Internal servers are closed after the external ones when gracefully shutting down.
func (*GitalyServerFactory) GracefulStop ¶
func (s *GitalyServerFactory) GracefulStop()
GracefulStop gracefully stops all servers created by the GitalyServerFactory. ExternalServers are stopped before the internal servers to ensure any RPCs accepted by the externals servers can still complete their requests to the internal servers. This is important for hooks calling back to Gitaly.
func (*GitalyServerFactory) StartWorkers ¶
func (s *GitalyServerFactory) StartWorkers(ctx context.Context, l logrus.FieldLogger, cfg config.Cfg) (func(), error)
StartWorkers will start any auxiliary background workers that are allowed to fail without stopping the rest of the server.
func (*GitalyServerFactory) Stop ¶
func (s *GitalyServerFactory) Stop()
Stop immediately stops all servers created by the GitalyServerFactory.