Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
Apply(svc *Server)
}
func WithMiddlewares ¶
func WithMiddlewares(middlewares ...middleware.Middleware) Option
WithMiddlewares is the option that adds middlewares to the server.
Example:
WithMiddlewares(middleware.WithRecover())
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a struct to handle server
func NewWithDefaultConfig ¶
NewWithDefaultConfig creates a new server with default config This config choosen by the author of the package
func (*Server) ListenGracefully ¶
ListenGracefully starts the server with the given address and config It will shutdown the server gracefully when os.Interrupt, syscall.SIGTERM, or syscall.SIGQUIT signal is received It will return error if the server failed to start
Click to show internal directories.
Click to hide internal directories.