Example #1
0
// NewServer returns a server that can serve thrift services over TChannel.
func NewServer(registrar tchannel.Registrar) *Server {
	return &Server{
		ch:       registrar,
		log:      registrar.Logger(),
		handlers: make(map[string]TChanServer),
	}
}
Example #2
0
// NewServer returns a server that can serve thrift services over TChannel.
func NewServer(registrar tchannel.Registrar) *Server {
	healthHandler := newHealthHandler()
	server := &Server{
		ch:            registrar,
		log:           registrar.Logger(),
		handlers:      make(map[string]TChanServer),
		healthHandler: healthHandler,
	}

	server.Register(newTChanMetaServer(healthHandler))
	return server
}