add bypass

This commit is contained in:
ginuerzh
2021-10-31 22:26:27 +08:00
parent 64736585ee
commit e2995ece96
18 changed files with 433 additions and 132 deletions

View File

@ -30,6 +30,11 @@ type LoadbalancingConfig struct {
FailTimeout time.Duration
}
type BypassConfig struct {
Name string
Reverse bool
Matchers []string
}
type ListenerConfig struct {
Type string
Metadata map[string]interface{}
@ -57,6 +62,7 @@ type ServiceConfig struct {
Listener *ListenerConfig
Handler *HandlerConfig
Chain string
Bypass string
}
type ChainConfig struct {
@ -77,12 +83,14 @@ type NodeConfig struct {
Addr string
Dialer *DialerConfig
Connector *ConnectorConfig
Bypass string
}
type Config struct {
Log *LogConfig
Services []ServiceConfig
Chains []ChainConfig
Bypasses []BypassConfig
}
func (c *Config) Load() error {