Documentation ¶
Index ¶
- type Server
- type ServerOption
- func Address(addr string) ServerOption
- func Listener(lis net.Listener) ServerOption
- func Logger(logger log.Logger) ServerOption
- func Middleware(m ...middleware.Middleware) ServerOption
- func Network(network string) ServerOption
- func ReadTimeout(timeout time.Duration) ServerOption
- func TLSConfig(c *tls.Config) ServerOption
- func WriteTimeout(timeout time.Duration) ServerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server is an HTTP server wrapper.
func NewServer ¶
func NewServer(opts ...ServerOption) *Server
NewServer creates an HTTP server by options.
func (*Server) Endpoint ¶
Endpoint return a real address to registry endpoint. examples:
https://127.0.0.1:8000 Legacy: http://127.0.0.1:8000?isSecure=false
type ServerOption ¶
type ServerOption func(*Server)
ServerOption is an HTTP server option.
func Logger ¶ added in v1.3.0
func Logger(logger log.Logger) ServerOption
Logger with server logger.
func Middleware ¶
func Middleware(m ...middleware.Middleware) ServerOption
Middleware with service middleware option.
func ReadTimeout ¶
func ReadTimeout(timeout time.Duration) ServerOption
ReadTimeout with server timeout.
func WriteTimeout ¶ added in v1.3.0
func WriteTimeout(timeout time.Duration) ServerOption
WriteTimeout with server timeout.
Click to show internal directories.
Click to hide internal directories.