mirror of
https://github.com/openziti/zrok.git
synced 2025-01-03 04:29:19 +01:00
the most rudimentary of limits (#96)
This commit is contained in:
parent
2da67d4a29
commit
0aa0eea0c7
@ -14,12 +14,13 @@ type Config struct {
|
|||||||
Admin *AdminConfig
|
Admin *AdminConfig
|
||||||
Endpoint *EndpointConfig
|
Endpoint *EndpointConfig
|
||||||
Email *EmailConfig
|
Email *EmailConfig
|
||||||
|
Influx *InfluxConfig
|
||||||
|
Limits *LimitsConfig
|
||||||
|
Maintenance *MaintenanceConfig
|
||||||
|
Metrics *MetricsConfig
|
||||||
Registration *RegistrationConfig
|
Registration *RegistrationConfig
|
||||||
Store *store.Config
|
Store *store.Config
|
||||||
Ziti *ZitiConfig
|
Ziti *ZitiConfig
|
||||||
Metrics *MetricsConfig
|
|
||||||
Influx *InfluxConfig
|
|
||||||
Maintenance *MaintenanceConfig
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdminConfig struct {
|
type AdminConfig struct {
|
||||||
@ -71,9 +72,22 @@ type RegistrationMaintenanceConfig struct {
|
|||||||
BatchLimit int
|
BatchLimit int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Unlimited = -1
|
||||||
|
|
||||||
|
type LimitsConfig struct {
|
||||||
|
Environments int
|
||||||
|
Shares int
|
||||||
|
}
|
||||||
|
|
||||||
func DefaultConfig() *Config {
|
func DefaultConfig() *Config {
|
||||||
return &Config{
|
return &Config{
|
||||||
Metrics: &MetricsConfig{ServiceName: "metrics"},
|
Limits: &LimitsConfig{
|
||||||
|
Environments: Unlimited,
|
||||||
|
Shares: Unlimited,
|
||||||
|
},
|
||||||
|
Metrics: &MetricsConfig{
|
||||||
|
ServiceName: "metrics",
|
||||||
|
},
|
||||||
Maintenance: &MaintenanceConfig{
|
Maintenance: &MaintenanceConfig{
|
||||||
Registration: &RegistrationMaintenanceConfig{
|
Registration: &RegistrationMaintenanceConfig{
|
||||||
ExpirationTimeout: time.Hour * 24,
|
ExpirationTimeout: time.Hour * 24,
|
||||||
|
Loading…
Reference in New Issue
Block a user