Documentation ¶
Overview ¶
recover handler for phi mux
Index ¶
- Variables
- func ClientIP(ctx *fasthttp.RequestCtx) string
- func ExpvarHandler(ctx *fasthttp.RequestCtx)
- func FastGetJson(url string, timeOut time.Duration) (*fasthttp.Response, error)
- func FastGetWithSession(url string, timeOut time.Duration, sid string) (*fasthttp.Response, error)
- func FastPostJson(url string, body []byte, timeOut time.Duration) (*fasthttp.Response, error)
- func HostClient()
- func InitExpvarServer()
- func NewGracefulListener(ln net.Listener, maxWaitTime time.Duration) net.Listener
- func PostStruct(url string, body interface{}, timeOut time.Duration) (*fasthttp.Response, error)
- func Recoverer(next phi.RequestHandlerFunc) phi.RequestHandlerFunc
- func UploadClient(uploadUri, filename, fieldname string) (string, error)
- type GracefulListener
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ProxyAddr string Log zerolog.Logger )
Functions ¶
func ClientIP ¶
func ClientIP(ctx *fasthttp.RequestCtx) string
func ExpvarHandler ¶
func ExpvarHandler(ctx *fasthttp.RequestCtx)
func FastGetWithSession ¶
func FastPostJson ¶
func HostClient ¶
func HostClient()
func InitExpvarServer ¶
func InitExpvarServer()
func NewGracefulListener ¶
NewGracefulListener wraps the given listener into 'graceful shutdown' listener.
func PostStruct ¶
func Recoverer ¶
func Recoverer(next phi.RequestHandlerFunc) phi.RequestHandlerFunc
Recoverer(next phi.HandlerFunc) phi.HandlerFunc
func UploadClient ¶
Types ¶
type GracefulListener ¶
type GracefulListener struct {
// contains filtered or unexported fields
}
func (*GracefulListener) Addr ¶
func (ln *GracefulListener) Addr() net.Addr
func (*GracefulListener) Close ¶
func (ln *GracefulListener) Close() error
Close closes the inner listener and waits until all the pending open connections are closed before returning.
Click to show internal directories.
Click to hide internal directories.