1 Star 0 Fork 0

东海苍月/traefik

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
common_label.go 2.73 KB
一键复制 编辑 原始数据 按行查看 历史
Ludovic Fernandez 提交于 2017-10-10 11:10 . Stickiness cookie name
package types
import "strings"
// Traefik labels
const (
LabelPrefix = "traefik."
LabelDomain = LabelPrefix + "domain"
LabelEnable = LabelPrefix + "enable"
LabelPort = LabelPrefix + "port"
LabelPortIndex = LabelPrefix + "portIndex"
LabelProtocol = LabelPrefix + "protocol"
LabelTags = LabelPrefix + "tags"
LabelWeight = LabelPrefix + "weight"
LabelFrontendAuthBasic = LabelPrefix + "frontend.auth.basic"
LabelFrontendEntryPoints = LabelPrefix + "frontend.entryPoints"
LabelFrontendPassHostHeader = LabelPrefix + "frontend.passHostHeader"
LabelFrontendPriority = LabelPrefix + "frontend.priority"
LabelFrontendRule = LabelPrefix + "frontend.rule"
LabelFrontendRuleType = LabelPrefix + "frontend.rule.type"
LabelTraefikFrontendValue = LabelPrefix + "frontend.value"
LabelTraefikFrontendWhitelistSourceRange = LabelPrefix + "frontend.whitelistSourceRange"
LabelBackend = LabelPrefix + "backend"
LabelBackendID = LabelPrefix + "backend.id"
LabelTraefikBackendCircuitbreaker = LabelPrefix + "backend.circuitbreaker"
LabelBackendCircuitbreakerExpression = LabelPrefix + "backend.circuitbreaker.expression"
LabelBackendHealthcheckPath = LabelPrefix + "backend.healthcheck.path"
LabelBackendHealthcheckInterval = LabelPrefix + "backend.healthcheck.interval"
LabelBackendLoadbalancerMethod = LabelPrefix + "backend.loadbalancer.method"
LabelBackendLoadbalancerSticky = LabelPrefix + "backend.loadbalancer.sticky"
LabelBackendLoadbalancerStickiness = LabelPrefix + "backend.loadbalancer.stickiness"
LabelBackendLoadbalancerStickinessCookieName = LabelPrefix + "backend.loadbalancer.stickiness.cookieName"
LabelBackendMaxconnAmount = LabelPrefix + "backend.maxconn.amount"
LabelBackendMaxconnExtractorfunc = LabelPrefix + "backend.maxconn.extractorfunc"
)
//ServiceLabel converts a key value of Label*, given a serviceName, into a pattern <LabelPrefix>.<serviceName>.<property>
// i.e. For LabelFrontendRule and serviceName=app it will return "traefik.app.frontend.rule"
func ServiceLabel(key, serviceName string) string {
if len(serviceName) > 0 {
property := strings.TrimPrefix(key, LabelPrefix)
return LabelPrefix + serviceName + "." + property
}
return key
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dhcy/traefik.git
git@gitee.com:dhcy/traefik.git
dhcy
traefik
traefik
v1.4.2

搜索帮助

0d507c66 1850385 C8b1a773 1850385