mirror of
https://github.com/openziti/zrok.git
synced 2025-01-11 00:18:43 +01:00
incorporate a separate 'warning' and 'limit' threshold (#235)
This commit is contained in:
parent
83ab21f00c
commit
bc1b42d946
@ -17,10 +17,15 @@ type BandwidthConfig struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type BandwidthPerPeriod struct {
|
type BandwidthPerPeriod struct {
|
||||||
Period time.Duration
|
Period time.Duration
|
||||||
Rx int64
|
Warning *Bandwidth
|
||||||
Tx int64
|
Limit *Bandwidth
|
||||||
Total int64
|
}
|
||||||
|
|
||||||
|
type Bandwidth struct {
|
||||||
|
Rx int64
|
||||||
|
Tx int64
|
||||||
|
Total int64
|
||||||
}
|
}
|
||||||
|
|
||||||
func DefaultConfig() *Config {
|
func DefaultConfig() *Config {
|
||||||
@ -30,21 +35,42 @@ func DefaultConfig() *Config {
|
|||||||
Bandwidth: &BandwidthConfig{
|
Bandwidth: &BandwidthConfig{
|
||||||
PerAccount: &BandwidthPerPeriod{
|
PerAccount: &BandwidthPerPeriod{
|
||||||
Period: 365 * (24 * time.Hour),
|
Period: 365 * (24 * time.Hour),
|
||||||
Rx: Unlimited,
|
Warning: &Bandwidth{
|
||||||
Tx: Unlimited,
|
Rx: Unlimited,
|
||||||
Total: Unlimited,
|
Tx: Unlimited,
|
||||||
|
Total: Unlimited,
|
||||||
|
},
|
||||||
|
Limit: &Bandwidth{
|
||||||
|
Rx: Unlimited,
|
||||||
|
Tx: Unlimited,
|
||||||
|
Total: Unlimited,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
PerEnvironment: &BandwidthPerPeriod{
|
PerEnvironment: &BandwidthPerPeriod{
|
||||||
Period: 365 * (24 * time.Hour),
|
Period: 365 * (24 * time.Hour),
|
||||||
Rx: Unlimited,
|
Warning: &Bandwidth{
|
||||||
Tx: Unlimited,
|
Rx: Unlimited,
|
||||||
Total: Unlimited,
|
Tx: Unlimited,
|
||||||
|
Total: Unlimited,
|
||||||
|
},
|
||||||
|
Limit: &Bandwidth{
|
||||||
|
Rx: Unlimited,
|
||||||
|
Tx: Unlimited,
|
||||||
|
Total: Unlimited,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
PerShare: &BandwidthPerPeriod{
|
PerShare: &BandwidthPerPeriod{
|
||||||
Period: 365 * (24 * time.Hour),
|
Period: 365 * (24 * time.Hour),
|
||||||
Rx: Unlimited,
|
Warning: &Bandwidth{
|
||||||
Tx: Unlimited,
|
Rx: Unlimited,
|
||||||
Total: Unlimited,
|
Tx: Unlimited,
|
||||||
|
Total: Unlimited,
|
||||||
|
},
|
||||||
|
Limit: &Bandwidth{
|
||||||
|
Rx: Unlimited,
|
||||||
|
Tx: Unlimited,
|
||||||
|
Total: Unlimited,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user