Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = ConfigYaml{}
配置
View Source
var FrontendWebsocketChan = make(chan *FrontendWebsocket, 1)
消息队列:添加 Frontend 和 Proxy 的连接
View Source
var FrontendWebsocketDelChan = make(chan string, 1)
消息队列:删除 Frontend 和 Proxy 的连接
View Source
var FrontendWebsockets = []*FrontendWebsocket{}
Frontend 和 Proxy 的连接
View Source
var Log = &log.Logger{}
日志组件
View Source
var ProxyWebsockets = []*websocket.Conn{}
Proxy 和 Frontend 的连接
View Source
var ReplyMessageQueues = []chan ReplyMessage{}
消息队列:待回复的消息
View Source
var RequestMessageChan = make(chan []byte, 1000)
消息队列:待发送到代理服务器消息
View Source
var ResponseChanMap = map[string]chan Response{}
接收响应的通道集合
View Source
var ResponseChanMapActionChan = make(chan ResponseChanMapAction, 1000)
消息队列:对 ResponseChanMap 的操作
Functions ¶
Types ¶
type ConfigYaml ¶
type ConfigYaml struct { Log struct { Level string `yaml:"Level"` ExportConsole int `yaml:"ExportConsole"` ExportFile struct { Path string `yaml:"Path"` } `yaml:"ExportFile"` } `yaml:"Log"` Frontend struct { HttpPort int `yaml:"HttpPort"` HttpTimeout int `yaml:"HttpTimeout"` HttpsCertFile string `yaml:"HttpsCertFile"` HttpsKeyFile string `yaml:"HttpsKeyFile"` WebsocketPort int `yaml:"WebsocketPort"` WebsocketPath string `yaml:"WebsocketPath"` SecretKey string `yaml:"SecretKey"` } `yaml:"Frontend"` Proxy struct { FrontendUrl string `yaml:"FrontendUrl"` BackendHost string `yaml:"BackendHost"` WebsocketNum int `yaml:"WebsocketNum"` SecretKey string `yaml:"SecretKey"` } `yaml:"Proxy"` Backend struct { HttpPort int `yaml:"HttpPort"` } `yaml:"Backend"` }
配置数据结构
type FrontendWebsocket ¶ added in v1.1.1
Frontend 和 Proxy 的连接
type Request ¶
type Request struct { Id string Method string Uri string Header map[string][]string Body []byte Timeout int }
请求
Click to show internal directories.
Click to hide internal directories.