Documentation
¶
Overview ¶
Package server defines the server's interface
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorResponse ¶
func ErrorResponse(c *echo.Context, e *errors.ErrorResponse) error
ErrorResponse returns a JSON error response
Types ¶
type Config ¶
type Config struct {
Name string
Addr string
Timeout time.Duration
HealthCheck func() error
ShutdownFunc func()
Middleware []echo.MiddlewareFunc
}
Config is the configuration for the server
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an instance of the server
func (*Server) Echo ¶
func (s *Server) Echo() *echo.Echo
Echo returns the echo instance for this server
func (*Server) Start ¶
func (s *Server) Start()
Start starts up the server and begins serving traffic
Click to show internal directories.
Click to hide internal directories.