Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New( secure bool, cfg config.Cfg, logrusEntry *log.Entry, registry *backchannel.Registry, cacheInvalidator diskcache.Invalidator, limitHandlers []*limithandler.LimiterMiddleware, ) (*grpc.Server, error)
New returns a GRPC server instance with a set of interceptors configured. If logrusEntry is nil the default logger will be used.
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, limitHandlers []*limithandler.LimiterMiddleware, ) *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) Stop ¶
func (s *GitalyServerFactory) Stop()
Stop immediately stops all servers created by the GitalyServerFactory.