Refactor(constant): added rule string enums in configs as RuleConfig for better outside integrations (#2878)
This commit is contained in:
@ -165,10 +165,12 @@ func resolveMetadata(ctx C.PlainContext, metadata *C.Metadata) (proxy C.Proxy, r
|
||||
proxy = proxies["DIRECT"]
|
||||
case Global:
|
||||
proxy = proxies["GLOBAL"]
|
||||
// Rule
|
||||
default:
|
||||
case Rule:
|
||||
proxy, rule, err = match(metadata)
|
||||
default:
|
||||
panic(fmt.Sprintf("unknown mode: %s", mode))
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user