Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wraps an http.Server
func NewServer ¶
func NewServer(name string, opts ...ServerOptFunc) (*Server, error)
NewServer configures and returns a new Server instance. Defaults are used when no ServerOptFuncs are provided.
func (*Server) ListenAndServe ¶
func (s *Server) ListenAndServe()
type ServerOptFunc ¶
ServerOptFunc is a function that can be used to customize a serverer
func WithAddr ¶
func WithAddr(addr string) ServerOptFunc
WithAddr sets the TCP address to listen on for an http server. If one is not provided, http.Server will default to :80.
func WithHandler ¶
func WithHandler(h http.Handler) ServerOptFunc
WithHandler sets the http handler for the server.
Click to show internal directories.
Click to hide internal directories.