Documentation
¶
Index ¶
- Constants
- type LierGin
- type LierGinOption
- type Router
- type Server
- type ServerOption
- func BaseContext(f func(net.Listener) context.Context) ServerOption
- func ConnContext(f func(context.Context, net.Conn) context.Context) ServerOption
- func ConnState(f func(net.Conn, http.ConnState)) ServerOption
- func ErrorLog(logger *log.Logger) ServerOption
- func WithServerAddr(addr string) ServerOption
- func WithServerIdleTimeout(timeout time.Duration) ServerOption
- func WithServerMaxHeaderBytes(size int) ServerOption
- func WithServerReadHeaderTimeout(timeout time.Duration) ServerOption
- func WithServerReadTimeout(timeout time.Duration) ServerOption
- func WithServerTLSConfig(config *tls.Config) ServerOption
- func WithServerTLSNextProto(proto map[string]func(*http.Server, *tls.Conn, http.Handler)) ServerOption
- func WithServerWriteTimeout(timeout time.Duration) ServerOption
Constants ¶
View Source
const ( LOCALHOST = "localhost" PORT8080 = 8080 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LierGin ¶
type LierGin struct {
// contains filtered or unexported fields
}
func NewGin ¶
func NewGin(options ...LierGinOption) *LierGin
func (*LierGin) SetRouters ¶
type LierGinOption ¶
type LierGinOption func(*LierGin)
func WithGinRouters ¶
func WithGinRouters(routerFunc ...Router) LierGinOption
func WithGinServer ¶
func WithGinServer(c *Server) LierGinOption
type ServerOption ¶
type ServerOption func(server *Server)
func BaseContext ¶
func BaseContext(f func(net.Listener) context.Context) ServerOption
BaseContext sets the server base context.
func ConnContext ¶
ConnContext sets the server connection context.
func ConnState ¶
func ConnState(f func(net.Conn, http.ConnState)) ServerOption
ConnState sets the server connection state.
func WithServerAddr ¶
func WithServerAddr(addr string) ServerOption
WithServerAddr sets the server address.
func WithServerIdleTimeout ¶
func WithServerIdleTimeout(timeout time.Duration) ServerOption
WithServerIdleTimeout sets the server idle timeout.
func WithServerMaxHeaderBytes ¶
func WithServerMaxHeaderBytes(size int) ServerOption
WithServerMaxHeaderBytes sets the server max header bytes.
func WithServerReadHeaderTimeout ¶
func WithServerReadHeaderTimeout(timeout time.Duration) ServerOption
WithServerReadHeaderTimeout sets the server read header timeout.
func WithServerReadTimeout ¶
func WithServerReadTimeout(timeout time.Duration) ServerOption
WithServerReadTimeout sets the server read timeout.
func WithServerTLSConfig ¶
func WithServerTLSConfig(config *tls.Config) ServerOption
WithServerTLSConfig sets the server TLS config.
func WithServerTLSNextProto ¶
func WithServerTLSNextProto(proto map[string]func(*http.Server, *tls.Conn, http.Handler)) ServerOption
WithServerTLSNextProto sets the server TLS next proto.
func WithServerWriteTimeout ¶
func WithServerWriteTimeout(timeout time.Duration) ServerOption
WithServerWriteTimeout sets the server write timeout.
Click to show internal directories.
Click to hide internal directories.