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