mirror of
https://github.com/openziti/zrok.git
synced 2025-08-17 19:31:12 +02:00
basic global bandwidth enforcement testing tweaks (no clases) (#606)
This commit is contained in:
@@ -17,6 +17,7 @@ type BandwidthClass interface {
|
||||
GetTxBytes() int64
|
||||
GetTotalBytes() int64
|
||||
GetLimitAction() LimitAction
|
||||
String() string
|
||||
}
|
||||
|
||||
type LimitClass struct {
|
||||
@@ -71,12 +72,10 @@ func (lc LimitClass) GetLimitAction() LimitAction {
|
||||
}
|
||||
|
||||
func (lc LimitClass) String() string {
|
||||
out, err := json.MarshalIndent(&lc, "", " ")
|
||||
if err != nil {
|
||||
return ""
|
||||
|
||||
if out, err := json.Marshal(&lc); err == nil {
|
||||
return "LimitClass<" + string(out) + ">"
|
||||
}
|
||||
return string(out)
|
||||
return "<<ERROR>>"
|
||||
}
|
||||
|
||||
var _ BandwidthClass = (*LimitClass)(nil)
|
||||
|
Reference in New Issue
Block a user