1
0
Fork 0
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:
liangwei 2018-08-22 21:00:33 +08:00
parent afcf6c526d
commit 99c4c6d5fc
2 changed files with 13 additions and 7 deletions

View file

@ -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

View file

@ -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