traffic_http_fast

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotFound added in v0.3.0

func NotFound(ctx *fasthttp.RequestCtx)

Types

type HttpService

type HttpService struct {
	// contains filtered or unexported fields
}

func NewHttpService

func NewHttpService(listener net.Listener) *HttpService

func (*HttpService) Set added in v0.3.0

func (h *HttpService) Set(handler fasthttp.RequestHandler)

func (*HttpService) ShutDown

func (h *HttpService) ShutDown()

type HttpTraffic

type HttpTraffic struct {
	// contains filtered or unexported fields
}

func NewHttpTraffic

func NewHttpTraffic() *HttpTraffic

func (*HttpTraffic) All added in v0.3.0

func (h *HttpTraffic) All() map[int]IService

func (*HttpTraffic) Close

func (h *HttpTraffic) Close()

func (*HttpTraffic) Get

func (h *HttpTraffic) Get(port int) (IService, bool)

func (*HttpTraffic) Set added in v0.3.0

func (h *HttpTraffic) Set(port int, srv *HttpService)

func (*HttpTraffic) ShutDown

func (h *HttpTraffic) ShutDown(port int)

type IHttpTraffic

type IHttpTraffic interface {
	Set(port int, srv *HttpService)
	Get(port int) (IService, bool)
	All() map[int]IService
	ShutDown(port int)
	Close()
}

type IService

type IService interface {
	Set(handler fasthttp.RequestHandler)
	ShutDown()
}

Jump to

Keyboard shortcuts

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