Documentation ¶
Overview ¶
global config
global var
Index ¶
- func HostListenIPFilter(addr net.Addr) bool
- func Init()
- func ListenAndServeInfoF(tls bool, port int, addrFilter ...psutil.AddrFilter)
- type ConfigOption
- func (o *ConfigOption) Load()
- func (o *ConfigOption) WithHandler(handler http.Handler) *ConfigOption
- func (o *ConfigOption) WithHost(host string) *ConfigOption
- func (o *ConfigOption) WithLogger(logger *log.Logger) *ConfigOption
- func (o *ConfigOption) WithMaxHeaderBytes(b int) *ConfigOption
- func (o *ConfigOption) WithPort(port int) *ConfigOption
- func (o *ConfigOption) WithTLS(certFilePath, keyFilePath string) *ConfigOption
- func (o *ConfigOption) WithTimeoutSec(read, write int) *ConfigOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HostListenIPFilter ¶ added in v1.1.8
func ListenAndServeInfoF ¶
func ListenAndServeInfoF(tls bool, port int, addrFilter ...psutil.AddrFilter)
Types ¶
type ConfigOption ¶
func New ¶
func New() *ConfigOption
func (*ConfigOption) Load ¶
func (o *ConfigOption) Load()
func (*ConfigOption) WithHandler ¶
func (o *ConfigOption) WithHandler(handler http.Handler) *ConfigOption
func (*ConfigOption) WithHost ¶
func (o *ConfigOption) WithHost(host string) *ConfigOption
WithHost referred to net.Dial Examples
func (*ConfigOption) WithLogger ¶
func (o *ConfigOption) WithLogger(logger *log.Logger) *ConfigOption
func (*ConfigOption) WithMaxHeaderBytes ¶
func (o *ConfigOption) WithMaxHeaderBytes(b int) *ConfigOption
func (*ConfigOption) WithPort ¶
func (o *ConfigOption) WithPort(port int) *ConfigOption
func (*ConfigOption) WithTLS ¶
func (o *ConfigOption) WithTLS(certFilePath, keyFilePath string) *ConfigOption
func (*ConfigOption) WithTimeoutSec ¶
func (o *ConfigOption) WithTimeoutSec(read, write int) *ConfigOption
Click to show internal directories.
Click to hide internal directories.