comment wrapNetns

This commit is contained in:
Nick Ethier 2019-09-30 12:06:52 -04:00
parent 67ac161565
commit 5127caef11
No known key found for this signature in database
GPG Key ID: 07C1A3ECED90D24A
1 changed files with 2 additions and 0 deletions

View File

@ -174,6 +174,8 @@ func DestroyCgroup(groups *lconfigs.Cgroup, executorPid int) error {
return mErrs.ErrorOrNil()
}
// wrapNetns takes a given function and calls it inside the network namespace
// given in the NetworkIsolationSpec
func wrapNetns(f func() error, spec *drivers.NetworkIsolationSpec) error {
if spec != nil && spec.Path != "" {
// Get a handle to the target network namespace