Documentation ¶ Index ¶ type Option func Address(addr string) Option func Handler(hander http.Handler) Option func StopTimeout(t time.Duration) Option type Server func New(opts ...Option) *Server func (s *Server) Start(ctx context.Context) error func (s *Server) Stop(ctx context.Context) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Option ¶ type Option func(*Server) Option is an HTTP server option. func Address ¶ func Address(addr string) Option Address with server address. func Handler ¶ func Handler(hander http.Handler) Option Handler with server handler. func StopTimeout ¶ func StopTimeout(t time.Duration) Option StopTimeout with server stopTimeout. type Server ¶ type Server struct { *http.Server // contains filtered or unexported fields } func New ¶ func New(opts ...Option) *Server func (*Server) Start ¶ func (s *Server) Start(ctx context.Context) error func (*Server) Stop ¶ func (s *Server) Stop(ctx context.Context) error Source Files ¶ View all Source files server.go Click to show internal directories. Click to hide internal directories.