Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
d9411d67
Commit
d9411d67
authored
Sep 06, 2017
by
m1093782566
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vendor libnetwork which support flush API
parent
dcc1aa06
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
Godeps.json
Godeps/Godeps.json
+1
-2
ipvs.go
vendor/github.com/docker/libnetwork/ipvs/ipvs.go
+7
-0
netlink.go
vendor/github.com/docker/libnetwork/ipvs/netlink.go
+7
-0
No files found.
Godeps/Godeps.json
View file @
d9411d67
...
@@ -1076,8 +1076,7 @@
...
@@ -1076,8 +1076,7 @@
},
},
{
{
"ImportPath"
:
"github.com/docker/libnetwork/ipvs"
,
"ImportPath"
:
"github.com/docker/libnetwork/ipvs"
,
"Comment"
:
"v0.8.0-dev.2-908-gd5c82231"
,
"Rev"
:
"ba46b928444931e6865d8618dc03622cac79aa6f"
"Rev"
:
"d5c822319097cc01cc9bd5ffedd74c7ce7c894f2"
},
},
{
{
"ImportPath"
:
"github.com/docker/libtrust"
,
"ImportPath"
:
"github.com/docker/libtrust"
,
...
...
vendor/github.com/docker/libnetwork/ipvs/ipvs.go
View file @
d9411d67
...
@@ -116,6 +116,13 @@ func (i *Handle) DelService(s *Service) error {
...
@@ -116,6 +116,13 @@ func (i *Handle) DelService(s *Service) error {
return
i
.
doCmd
(
s
,
nil
,
ipvsCmdDelService
)
return
i
.
doCmd
(
s
,
nil
,
ipvsCmdDelService
)
}
}
// Flush deletes all existing services in the passed
// handle.
func
(
i
*
Handle
)
Flush
()
error
{
_
,
err
:=
i
.
doCmdWithoutAttr
(
ipvsCmdFlush
)
return
err
}
// NewDestination creates a new real server in the passed ipvs
// NewDestination creates a new real server in the passed ipvs
// service which should already be existing in the passed handle.
// service which should already be existing in the passed handle.
func
(
i
*
Handle
)
NewDestination
(
s
*
Service
,
d
*
Destination
)
error
{
func
(
i
*
Handle
)
NewDestination
(
s
*
Service
,
d
*
Destination
)
error
{
...
...
vendor/github.com/docker/libnetwork/ipvs/netlink.go
View file @
d9411d67
...
@@ -402,6 +402,13 @@ func (i *Handle) doGetServicesCmd(svc *Service) ([]*Service, error) {
...
@@ -402,6 +402,13 @@ func (i *Handle) doGetServicesCmd(svc *Service) ([]*Service, error) {
return
res
,
nil
return
res
,
nil
}
}
// doCmdWithoutAttr a simple wrapper of netlink socket execute command
func
(
i
*
Handle
)
doCmdWithoutAttr
(
cmd
uint8
)
([][]
byte
,
error
)
{
req
:=
newIPVSRequest
(
cmd
)
req
.
Seq
=
atomic
.
AddUint32
(
&
i
.
seq
,
1
)
return
execute
(
i
.
sock
,
req
,
0
)
}
func
assembleDestination
(
attrs
[]
syscall
.
NetlinkRouteAttr
)
(
*
Destination
,
error
)
{
func
assembleDestination
(
attrs
[]
syscall
.
NetlinkRouteAttr
)
(
*
Destination
,
error
)
{
var
d
Destination
var
d
Destination
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment