stdserver

package
v1.2.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

global config

global var

Index

Constants

This section is empty.

Variables

Functions

func AllIntfs added in v1.2.30

func AllIntfs(port int) string

func HostListenIPFilter added in v1.1.8

func HostListenIPFilter(addr net.Addr) bool

func Init

func Init()

func ListenAndServeInfoF

func ListenAndServeInfoF(tls bool, port int, addrFilter ...psutil.AddrFilter)

Types

type ConfigOption

type ConfigOption struct {
	sync.Once
	// contains filtered or unexported fields
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL