Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostPattern ¶
type HostPattern string
HostPattern hostname pattern type
func (HostPattern) Match ¶
func (p HostPattern) Match(v string) bool
Match check if given hostname match host
type Hosts ¶
type Hosts struct {
Patterns []HostPattern
}
Hosts hostname list middleware struct
func (Hosts) ServeMiddleware ¶
func (h Hosts) ServeMiddleware(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
ServeMiddleware server hostname list middleware
type ListenerConfig ¶
type ListenerConfig struct { //Net net interface,"tcp" for example. Net string //Addr network addr. Addr string }
ListenerConfig listener config struct
func (*ListenerConfig) Clone ¶
func (c *ListenerConfig) Clone() *ListenerConfig
type ListenerOption ¶
ListenerOption listener option
type TLSConfig ¶
type TLSConfig struct { //TLS whether use tls TLS bool //TLSCertPath tls cert file path TLSCertPath string //TLSKeyPath tls key file path TLSKeyPath string }
TLSConfig tls config
func (*TLSConfig) ServerIsTLSEnabeld ¶
ServerIsTLSEnabeld return is server tls enabled
func (*TLSConfig) ServerTLSCertPath ¶
ServerTLSCertPath return server tls cert path
func (*TLSConfig) ServerTLSKeyPath ¶
ServerTLSKeyPath resturn serve tls key path
type TLSOption ¶
type TLSOption interface { //ServerIsTLSEnabeld return is server tls enabled ServerTLSEnabeld() bool //ServerTLSCertPath return server tls cert path ServerTLSCertPath() string //ServerTLSKeyPath resturn serve tls key path ServerTLSKeyPath() string }
TLSOption server tls option interface
Click to show internal directories.
Click to hide internal directories.