Files
openlan/pkg/config/qos.go
2024-03-28 11:45:49 +08:00

24 lines
509 B
Go

package config
import "github.com/luscis/openlan/pkg/libol"
type Qos struct {
File string `json:"file"`
Name string `json:"name"`
Config map[string]*QosLimit `json:"qos,omitempty"`
}
func (q *Qos) Save() {
if err := libol.MarshalSave(q, q.File, true); err != nil {
libol.Error("Switch.Save.Qos %s %s", q.Name, err)
}
}
type QosLimit struct {
InSpeed int64 `json:"inSpeed,omitempty"`
OutSpeed int64 `json:"outSpeed,omitempty"`
}
func (ql *QosLimit) Correct() {
}