TUN-8861: Add configuration for active sessions limiter

## Summary
This commit adds a new configuration in the warp routing
config to allow users to define the active sessions limit
value.
This commit is contained in:
João "Pisco" Fernandes
2025-01-13 19:46:50 +00:00
parent 8bfe111cab
commit 8c2eda16c1
3 changed files with 18 additions and 3 deletions

View File

@@ -155,7 +155,7 @@ func FindOrCreateConfigPath() string {
// i.e. it fails if a user specifies both --url and --unix-socket
func ValidateUnixSocket(c *cli.Context) (string, error) {
if c.IsSet("unix-socket") && (c.IsSet("url") || c.NArg() > 0) {
return "", errors.New("--unix-socket must be used exclusivly.")
return "", errors.New("--unix-socket must be used exclusively.")
}
return c.String("unix-socket"), nil
}
@@ -260,6 +260,7 @@ type Configuration struct {
type WarpRoutingConfig struct {
ConnectTimeout *CustomDuration `yaml:"connectTimeout" json:"connectTimeout,omitempty"`
MaxActiveFlows *uint64 `yaml:"maxActiveFlows" json:"maxActiveFlows,omitempty"`
TCPKeepAlive *CustomDuration `yaml:"tcpKeepAlive" json:"tcpKeepAlive,omitempty"`
}