Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RestServer ¶
type RestServer struct {
// contains filtered or unexported fields
}
Server is the implementation of an API Server
func NewRestServer ¶
func NewRestServer(name, profile string, keepAlive bool) *RestServer
NewServer returns a new configured instance of Server
func (*RestServer) RegisterService ¶
func (s *RestServer) RegisterService(f func(*gin.Engine))
func (*RestServer) Serve ¶
func (s *RestServer) Serve(apiAddr string) error
Serve starts the api listeners of the Server
func (*RestServer) ServeFromListener ¶
func (s *RestServer) ServeFromListener(apiLis net.Listener) error
ServeFromListener starts the api listeners of the Server
type RestServiceRegistrar ¶
type RestServiceRegistrar interface { // RegisterService registers a service and its implementation to the // gin router RegisterRoutes(router *gin.Engine) }
ServiceRegistrar wraps a single method that supports service registration.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the implementation of an API Server
func NewGrpcServer ¶
NewServer returns a new configured instance of Server
func NewServerWithOpts ¶
func NewServerWithOpts(name string, keepAlive bool, unaryServerInterceptors []grpc.UnaryServerInterceptor, streamServerInterceptors []grpc.StreamServerInterceptor) *Server
NewServerWithOpts returns a new configured instance of Server with additional interceptros specified
func (*Server) RegisterService ¶
func (s *Server) RegisterService(f func(grpc.ServiceRegistrar))
RegisterService registers your gRPC service implementation with the server
func (*Server) ServeFromListener ¶
ServeFromListener starts the api listeners of the Server
Click to show internal directories.
Click to hide internal directories.