1
1
mirror of https://github.com/openziti/zrok.git synced 2024-12-31 19:22:37 +01:00

handlers for account, environment, and strategy ()

This commit is contained in:
Michael Quigley 2023-03-23 17:04:10 -04:00
parent 0bed934976
commit c91fc8ac9e
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
2 changed files with 16 additions and 1 deletions
controller/limits

View File

@ -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,

View 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
}