mirror of
https://github.com/openziti/zrok.git
synced 2024-12-31 19:22:37 +01:00
handlers for account, environment, and strategy (#276)
This commit is contained in:
parent
0bed934976
commit
c91fc8ac9e
@ -32,7 +32,7 @@ type Bandwidth struct {
|
||||
|
||||
func DefaultBandwidthPerPeriod() *BandwidthPerPeriod {
|
||||
return &BandwidthPerPeriod{
|
||||
Period: 15 * (24 * time.Hour),
|
||||
Period: 24 * time.Hour,
|
||||
Warning: &Bandwidth{
|
||||
Rx: Unlimited,
|
||||
Tx: Unlimited,
|
||||
|
15
controller/limits/model.go
Normal file
15
controller/limits/model.go
Normal file
@ -0,0 +1,15 @@
|
||||
package limits
|
||||
|
||||
import "github.com/openziti/zrok/controller/store"
|
||||
|
||||
type AccountStrategy interface {
|
||||
HandleAccount(a *store.Account, rxBytes, txBytes int64, limit *BandwidthPerPeriod) error
|
||||
}
|
||||
|
||||
type EnvironmentStrategy interface {
|
||||
HandleEnvironment(e *store.Environment, rxBytes, txBytes int64, limit *BandwidthPerPeriod) error
|
||||
}
|
||||
|
||||
type ShareStrategy interface {
|
||||
HandleShare(s *store.Share, rxBytes, txBytes int64, limit *BandwidthPerPeriod) error
|
||||
}
|
Loading…
Reference in New Issue
Block a user