mirror of
https://github.com/luscis/openlan.git
synced 2025-10-03 07:46:26 +08:00
24 lines
613 B
Go
24 lines
613 B
Go
package config
|
|
|
|
type NextGroup struct {
|
|
Check string `json:"check"`
|
|
Ping PingParams `json:"ping"`
|
|
Mode string `json:"mode,omitempty"`
|
|
NextHop []string `json:"nexthop"`
|
|
AvailableNextHop []MultiPath `json:"availableNexthop,omitempty"`
|
|
}
|
|
|
|
func (ng *NextGroup) Correct() {
|
|
|
|
if ng.AvailableNextHop == nil {
|
|
ng.AvailableNextHop = []MultiPath{}
|
|
}
|
|
}
|
|
|
|
type PingParams struct {
|
|
Count int `json:"count"`
|
|
Loss int `json:"loss,omitempty"`
|
|
Rtt int `json:"rtt,omitempty"`
|
|
CheckFrequency int `json:"checkFrequency,omitempty"`
|
|
}
|