proxyutils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT, MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddServerMenu

func AddServerMenu(actionWrapper actions.ActionWrapper, isIndex bool)

添加服务器菜单

func AddServerToMenu

func AddServerToMenu(server *teaconfigs.ServerConfig, action *actions.ActionObject, menu *utils.Menu, serverId string)

将Server添加到菜单上

func ApplyChartChanges

func ApplyChartChanges() error

应用图表更新

func CheckChartChanges

func CheckChartChanges() bool

检查图表是否有更新

func ConvertReceiversToMaps

func ConvertReceiversToMaps(receivers []*notices.NoticeReceiver) (result []maps.Map)

将Receiver转换为Map

func DefaultRequestVariables

func DefaultRequestVariables() []maps.Map

默认的请求变量列表

func FinishChange

func FinishChange()

func FormatAccessLog

func FormatAccessLog(accessLogs []*teaconfigs.AccessLogConfig) []maps.Map

格式化访问日志配置

func NotifyChange

func NotifyChange()

func NotifyProxyBackendDownMessage

func NotifyProxyBackendDownMessage(event *teaconfigs.BackendDownEvent) error

发送一个后端下线通知

func NotifyProxyBackendUpMessage

func NotifyProxyBackendUpMessage(event *teaconfigs.BackendUpEvent) error

发送一个后端上线通知

func NotifyServer

func NotifyServer(server *teaconfigs.ServerConfig, level notices.NoticeLevel, subject string, message string)

推送代理服务相关通知

func Observe

func Observe(f func())

func ParseAccessLogForm

func ParseAccessLogForm(req *http.Request) (result []*teaconfigs.AccessLogConfig)

从请求中获取访问日志信息

func ParseRequestConds

func ParseRequestConds(req *http.Request, prefix string) (conds []*shared.RequestCond, breakCond *shared.RequestCond, err error)

从请求中分析请求匹配条件

func ProxyIsChanged

func ProxyIsChanged() bool

func ReloadServerStats

func ReloadServerStats(serverId string)

刷新服务统计

func WrapServerData

func WrapServerData(server *teaconfigs.ServerConfig) maps.Map

包装Server相关数据

Types

This section is empty.

Jump to

Keyboard shortcuts

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