mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
ipvs support rs connection information
Signed-off-by: liangwei <liangwei14@huawei.com>
This commit is contained in:
parent
afcf6c526d
commit
99c4c6d5fc
2 changed files with 13 additions and 7 deletions
|
@ -60,6 +60,8 @@ type Destination struct {
|
|||
AddressFamily uint16
|
||||
UpperThreshold uint32
|
||||
LowerThreshold uint32
|
||||
ActiveConnections int
|
||||
InactiveConnections int
|
||||
}
|
||||
|
||||
// Handle provides a namespace specific ipvs handle to program ipvs
|
||||
|
|
|
@ -439,6 +439,10 @@ func assembleDestination(attrs []syscall.NetlinkRouteAttr) (*Destination, error)
|
|||
d.LowerThreshold = native.Uint32(attr.Value)
|
||||
case ipvsDestAttrAddressFamily:
|
||||
d.AddressFamily = native.Uint16(attr.Value)
|
||||
case ipvsDestAttrActiveConnections:
|
||||
d.ActiveConnections = int(native.Uint16(attr.Value))
|
||||
case ipvsDestAttrInactiveConnections:
|
||||
d.InactiveConnections = int(native.Uint16(attr.Value))
|
||||
}
|
||||
}
|
||||
return &d, nil
|
||||
|
|
Loading…
Add table
Reference in a new issue