Documentation
¶
Overview ¶
Package server 包含HTTP,WebSocket,反向WebSocket请求处理的相关函数与结构体
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPClient ¶
type HTTPClient struct {
MaxRetries uint64
RetriesInterval uint64
// contains filtered or unexported fields
}
HTTPClient 反向HTTP上报客户端
type HTTPServer ¶
type HTTPServer struct {
Disabled bool `yaml:"disabled"`
Version uint16 `yaml:"version"`
Address string `yaml:"address"`
Host string `yaml:"host"`
Port int `yaml:"port"`
Timeout int32 `yaml:"timeout"`
LongPolling struct {
Enabled bool `yaml:"enabled"`
MaxQueueSize int `yaml:"max-queue-size"`
} `yaml:"long-polling"`
Post []httpServerPost `yaml:"post"`
MiddleWares `yaml:"middlewares"`
}
HTTPServer HTTP通信相关配置
type LambdaServer ¶
type LambdaServer struct {
Disabled bool `yaml:"disabled"`
Type string `yaml:"type"`
MiddleWares `yaml:"middlewares"`
}
LambdaServer 云函数配置
type MiddleWares ¶
type MiddleWares struct {
AccessToken string `yaml:"access-token"`
Filter string `yaml:"filter"`
RateLimit struct {
Enabled bool `yaml:"enabled"`
Frequency float64 `yaml:"frequency"`
Bucket int `yaml:"bucket"`
} `yaml:"rate-limit"`
}
MiddleWares 通信中间件
type WebsocketReverse ¶
type WebsocketReverse struct {
Disabled bool `yaml:"disabled"`
Universal string `yaml:"universal"`
API string `yaml:"api"`
Event string `yaml:"event"`
ReconnectInterval int `yaml:"reconnect-interval"`
MiddleWares `yaml:"middlewares"`
}
WebsocketReverse 反向WS相关配置
type WebsocketServer ¶
type WebsocketServer struct {
Disabled bool `yaml:"disabled"`
Address string `yaml:"address"`
Host string `yaml:"host"`
Port int `yaml:"port"`
MiddleWares `yaml:"middlewares"`
}
WebsocketServer 正向WS相关配置
Click to show internal directories.
Click to hide internal directories.