Merge pull request #43668 from thaJeztah/bump_ipvs

vendor: github.com/moby/ipvs v1.0.2
This commit is contained in:
Sebastiaan van Stijn 2022-05-31 20:36:39 +02:00 committed by GitHub
commit ceefa7c7ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 28 deletions

View file

@ -49,7 +49,7 @@ require (
github.com/miekg/dns v1.1.27
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible
github.com/moby/buildkit v0.10.3 // FIXME(thaJeztah) when updating, remove the temporary override in /.github/workflows/ci.yml
github.com/moby/ipvs v1.0.1
github.com/moby/ipvs v1.0.2
github.com/moby/locker v1.0.1
github.com/moby/swarmkit/v2 v2.0.0-20220420172245-6068d1894d46
github.com/moby/sys/mount v0.3.1

View file

@ -729,8 +729,8 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh
github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A=
github.com/moby/buildkit v0.10.3 h1:/dGykD8FW+H4p++q5+KqKEo6gAkYKyBQHdawdjVwVAU=
github.com/moby/buildkit v0.10.3/go.mod h1:jxeOuly98l9gWHai0Ojrbnczrk/rf+o9/JqNhY+UCSo=
github.com/moby/ipvs v1.0.1 h1:aoZ7fhLTXgDbzVrAnvV+XbKOU8kOET7B3+xULDF/1o0=
github.com/moby/ipvs v1.0.1/go.mod h1:2pngiyseZbIKXNv7hsKj3O9UEz30c53MT9005gt2hxQ=
github.com/moby/ipvs v1.0.2 h1:NSbzuRTvfneftLU3VwPU5QuA6NZ0IUmqq9+VHcQxqHw=
github.com/moby/ipvs v1.0.2/go.mod h1:2pngiyseZbIKXNv7hsKj3O9UEz30c53MT9005gt2hxQ=
github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg=
github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc=
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=

View file

@ -88,20 +88,20 @@ const (
ipvsDestAttrAddressFamily
)
// IPVS Svc Statistics constancs
// IPVS Statistics constants
const (
ipvsSvcStatsUnspec int = iota
ipvsSvcStatsConns
ipvsSvcStatsPktsIn
ipvsSvcStatsPktsOut
ipvsSvcStatsBytesIn
ipvsSvcStatsBytesOut
ipvsSvcStatsCPS
ipvsSvcStatsPPSIn
ipvsSvcStatsPPSOut
ipvsSvcStatsBPSIn
ipvsSvcStatsBPSOut
ipvsStatsUnspec int = iota
ipvsStatsConns
ipvsStatsPktsIn
ipvsStatsPktsOut
ipvsStatsBytesIn
ipvsStatsBytesOut
ipvsStatsCPS
ipvsStatsPPSIn
ipvsStatsPPSOut
ipvsStatsBPSIn
ipvsStatsBPSOut
)
// Destination forwarding methods

View file

@ -287,25 +287,25 @@ func assembleStats(msg []byte) (SvcStats, error) {
for _, attr := range attrs {
attrType := int(attr.Attr.Type)
switch attrType {
case ipvsSvcStatsConns:
case ipvsStatsConns:
s.Connections = native.Uint32(attr.Value)
case ipvsSvcStatsPktsIn:
case ipvsStatsPktsIn:
s.PacketsIn = native.Uint32(attr.Value)
case ipvsSvcStatsPktsOut:
case ipvsStatsPktsOut:
s.PacketsOut = native.Uint32(attr.Value)
case ipvsSvcStatsBytesIn:
case ipvsStatsBytesIn:
s.BytesIn = native.Uint64(attr.Value)
case ipvsSvcStatsBytesOut:
case ipvsStatsBytesOut:
s.BytesOut = native.Uint64(attr.Value)
case ipvsSvcStatsCPS:
case ipvsStatsCPS:
s.CPS = native.Uint32(attr.Value)
case ipvsSvcStatsPPSIn:
case ipvsStatsPPSIn:
s.PPSIn = native.Uint32(attr.Value)
case ipvsSvcStatsPPSOut:
case ipvsStatsPPSOut:
s.PPSOut = native.Uint32(attr.Value)
case ipvsSvcStatsBPSIn:
case ipvsStatsBPSIn:
s.BPSIn = native.Uint32(attr.Value)
case ipvsSvcStatsBPSOut:
case ipvsStatsBPSOut:
s.BPSOut = native.Uint32(attr.Value)
}
}
@ -447,9 +447,9 @@ func assembleDestination(attrs []syscall.NetlinkRouteAttr) (*Destination, error)
case ipvsDestAttrLowerThreshold:
d.LowerThreshold = native.Uint32(attr.Value)
case ipvsDestAttrActiveConnections:
d.ActiveConnections = int(native.Uint16(attr.Value))
d.ActiveConnections = int(native.Uint32(attr.Value))
case ipvsDestAttrInactiveConnections:
d.InactiveConnections = int(native.Uint16(attr.Value))
d.InactiveConnections = int(native.Uint32(attr.Value))
case ipvsDestAttrStats:
stats, err := assembleStats(attr.Value)
if err != nil {

2
vendor/modules.txt vendored
View file

@ -581,7 +581,7 @@ github.com/moby/buildkit/util/urlutil
github.com/moby/buildkit/util/winlayers
github.com/moby/buildkit/version
github.com/moby/buildkit/worker
# github.com/moby/ipvs v1.0.1
# github.com/moby/ipvs v1.0.2
## explicit; go 1.13
github.com/moby/ipvs
# github.com/moby/locker v1.0.1