logics

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFrontendWebsocket added in v1.1.1

func AddFrontendWebsocket(conn *app.FrontendWebsocket)

添加 Websocket 连接到全局

func ConnectFrontend added in v1.1.1

func ConnectFrontend(num int, options ...bool) *websocket.Conn

连接到 Frontend

func ConsumeFrontendWebsocketChan added in v1.1.1

func ConsumeFrontendWebsocketChan()

消费消息队列:添加 Frontend 和 Proxy 的连接

func ConsumeFrontendWebsocketDelChan added in v1.1.1

func ConsumeFrontendWebsocketDelChan()

消费消息队列:删除 Frontend 和 Proxy 的连接

func ConsumeReplyMessageQueue added in v1.1.1

func ConsumeReplyMessageQueue(num int)

消费消息队列:待回复的消息

func ConsumeRequestMessageChan

func ConsumeRequestMessageChan()

消费消息队列:发送到代理服务器的消息

func ConsumeResponseChanMapActionChan

func ConsumeResponseChanMapActionChan()

消费消息队列:对 ResponseChanMap 的操作

func DelFrontendWebsocket added in v1.1.1

func DelFrontendWebsocket(connId string)

从全局移除 Websocket 连接

func DisconnectFrontend added in v1.1.1

func DisconnectFrontend()

断开和 Frontend 的连接

func HttpHandler

func HttpHandler(c *gin.Context)

处理 HTTP 请求

func ProxyRequest

func ProxyRequest(num int, request app.Request)

代理请求

func ReadRequest

func ReadRequest(num int)

读取请求

func ReceiveProxyResponse

func ReceiveProxyResponse(message []byte)

接收代理的响应

func ReplyError

func ReplyError(num int, requestId string, err error)

回复一个错误

func ReplyResponse

func ReplyResponse(num int, requestId string, response *http.Response)

回复一个响应

func SendHeartbeat

func SendHeartbeat(num int)

发送心跳

Types

This section is empty.

Jump to

Keyboard shortcuts

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