File tree 2 files changed +9
-8
lines changed
2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change
1
+ // Package netns allows ultra-simple network namespace handling. NsHandles
2
+ // can be retrieved and set. Note that the current namespace is thread
3
+ // local so actions that set and reset namespaces should use LockOSThread
4
+ // to make sure the namespace doesn't change due to a goroutine switch.
5
+ // It is best to close NsHandles when you are done with them. This can be
6
+ // accomplished via a `defer ns.Close()` on the handle. Changing namespaces
7
+ // requires elevated privileges, so in most cases this code needs to be run
8
+ // as root.
9
+ package netns
Original file line number Diff line number Diff line change 1
- // Package netns allows ultra-simple network namespace handling. NsHandles
2
- // can be retrieved and set. Note that the current namespace is thread
3
- // local so actions that set and reset namespaces should use LockOSThread
4
- // to make sure the namespace doesn't change due to a goroutine switch.
5
- // It is best to close NsHandles when you are done with them. This can be
6
- // accomplished via a `defer ns.Close()` on the handle. Changing namespaces
7
- // requires elevated privileges, so in most cases this code needs to be run
8
- // as root.
9
1
package netns
10
2
11
3
import (
You can’t perform that action at this time.
0 commit comments