httpserver

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIMEOUT_30_SEC = 30 * time.Second
	TIMEOUT_10_SEC = 10 * time.Second
	TIMEOUT_5_SEC  = 5 * time.Second
	TIMEOUT_1_SEC  = 1 * time.Second
)
View Source
const (
	ErrorParamsEmpty errors.CodeError = iota + errors.MIN_PKG_Httpserver
)

Variables

This section is empty.

Functions

func IsCodeError

func IsCodeError() bool

func IsRunning

func IsRunning(allSrv ...HTTPServer) bool

func Listen

func Listen(allSrv ...HTTPServer)

func ListenWaitNotify

func ListenWaitNotify(allSrv ...HTTPServer)

func Restart

func Restart(allSrv ...HTTPServer)

func Shutdown

func Shutdown(allSrv ...HTTPServer)

Types

type HTTPServer

type HTTPServer interface {
	SetIdleTimeout(idleTimeout time.Duration)
	GetIdleTimeout() time.Duration

	GetBindable() string
	GetExpose() string
	IsRunning() bool

	Listen()
	Restart()
	Shutdown()

	WaitNotify()
}

func NewServer

func NewServer(listen, expose string, handler http.Handler, tlsConfig *tls.Config) HTTPServer

Jump to

Keyboard shortcuts

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