1 Star 1 Fork 1

shura/proxy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
location.go 659 Bytes
一键复制 编辑 原始数据 按行查看 历史
package proxy
import (
"github.com/shura1014/balance"
)
type Location struct {
Rule string
Servers []*Server
// 健康检查
Check *Check
// 负载均衡策略
Balance balance.Balance[*Server]
// 是否是一个静态资源服务器
IsStatic bool
// 如果有root 那么就是一个静态资源服务器
Root string
// 如果是静态资源服务器,可以提供默认访问的首页地址
Index string
// add_header
headers map[string]string
expression []*Expression
referer *Referer
}
func NewLocation() *Location {
return &Location{
Servers: make([]*Server, 0),
Check: &Check{},
headers: make(map[string]string),
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/shura1014/proxy.git
[email protected]:shura1014/proxy.git
shura1014
proxy
proxy
main

搜索帮助