mirror of
https://github.com/luscis/openlan.git
synced 2025-10-06 00:57:03 +08:00
fea:support nexthop group for routing ha (#57)
This commit is contained in:
23
pkg/config/nextgroup.go
Normal file
23
pkg/config/nextgroup.go
Normal file
@@ -0,0 +1,23 @@
|
||||
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"`
|
||||
}
|
Reference in New Issue
Block a user