Bumping k8s dependencies to 1.13
This commit is contained in:
24
vendor/k8s.io/kubernetes/pkg/util/ipvs/ipvs_linux.go
generated
vendored
24
vendor/k8s.io/kubernetes/pkg/util/ipvs/ipvs_linux.go
generated
vendored
@@ -144,6 +144,18 @@ func (runner *runner) DeleteRealServer(vs *VirtualServer, rs *RealServer) error
|
||||
return runner.ipvsHandle.DelDestination(svc, dst)
|
||||
}
|
||||
|
||||
func (runner *runner) UpdateRealServer(vs *VirtualServer, rs *RealServer) error {
|
||||
svc, err := toIPVSService(vs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
dst, err := toIPVSDestination(rs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return runner.ipvsHandle.UpdateDestination(svc, dst)
|
||||
}
|
||||
|
||||
// GetRealServers is part of ipvs.Interface.
|
||||
func (runner *runner) GetRealServers(vs *VirtualServer) ([]*RealServer, error) {
|
||||
svc, err := toIPVSService(vs)
|
||||
@@ -203,9 +215,11 @@ func toRealServer(dst *libipvs.Destination) (*RealServer, error) {
|
||||
return nil, errors.New("ipvs destination should not be empty")
|
||||
}
|
||||
return &RealServer{
|
||||
Address: dst.Address,
|
||||
Port: dst.Port,
|
||||
Weight: dst.Weight,
|
||||
Address: dst.Address,
|
||||
Port: dst.Port,
|
||||
Weight: dst.Weight,
|
||||
ActiveConn: dst.ActiveConnections,
|
||||
InactiveConn: dst.InactiveConnections,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -252,6 +266,8 @@ func stringToProtocol(protocol string) uint16 {
|
||||
return uint16(syscall.IPPROTO_TCP)
|
||||
case "udp":
|
||||
return uint16(syscall.IPPROTO_UDP)
|
||||
case "sctp":
|
||||
return uint16(syscall.IPPROTO_SCTP)
|
||||
}
|
||||
return uint16(0)
|
||||
}
|
||||
@@ -263,6 +279,8 @@ func protocolToString(proto Protocol) string {
|
||||
return "TCP"
|
||||
case syscall.IPPROTO_UDP:
|
||||
return "UDP"
|
||||
case syscall.IPPROTO_SCTP:
|
||||
return "SCTP"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
Reference in New Issue
Block a user