File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import (
12
12
13
13
type Commander interface {
14
14
Open () error
15
+ SetEnv (key string , value string )
15
16
Command (command []string ) * exec.Cmd
16
17
Close () error
17
18
}
@@ -83,4 +84,4 @@ func (j *Jail) Close() error {
83
84
84
85
// Close command executor
85
86
return j .commandExecutor .Close ()
86
- }
87
+ }
Original file line number Diff line number Diff line change @@ -115,6 +115,11 @@ func (l *Linux) Open() error {
115
115
return nil
116
116
}
117
117
118
+ // SetEnv sets an environment variable for commands run in the namespace
119
+ func (l * Linux ) SetEnv (key string , value string ) {
120
+
121
+ }
122
+
118
123
// Command returns an exec.Cmd configured to run within the network namespace
119
124
func (l * Linux ) Command (command []string ) * exec.Cmd {
120
125
l .logger .Debug ("Command called" , "command" , command )
Original file line number Diff line number Diff line change @@ -121,6 +121,11 @@ func (m *MacOSNetJail) Open() error {
121
121
return nil
122
122
}
123
123
124
+ // SetEnv sets an environment variable for commands run in the namespace
125
+ func (m * MacOSNetJail ) SetEnv (key string , value string ) {
126
+
127
+ }
128
+
124
129
// Execute runs the command with the network jail group membership
125
130
func (m * MacOSNetJail ) Command (command []string ) * exec.Cmd {
126
131
m .logger .Debug ("Command called" , "command" , command )
You can’t perform that action at this time.
0 commit comments