We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d5f63dc + 2f9e685 commit e559bd8Copy full SHA for e559bd8
1 file changed
opts.go
@@ -18,10 +18,13 @@ package cni
18
19
import (
20
"fmt"
21
+ "os"
22
"sort"
23
"strings"
24
25
cnilibrary "github.com/containernetworking/cni/libcni"
26
+ "github.com/containernetworking/cni/pkg/invoke"
27
+ "github.com/containernetworking/cni/pkg/version"
28
)
29
30
// Opt sets options for a CNI instance
@@ -41,7 +44,13 @@ func WithInterfacePrefix(prefix string) Opt {
41
44
func WithPluginDir(dirs []string) Opt {
42
45
return func(c *libcni) error {
43
46
c.pluginDirs = dirs
- c.cniConfig = &cnilibrary.CNIConfig{Path: dirs}
47
+ c.cniConfig = cnilibrary.NewCNIConfig(
48
+ dirs,
49
+ &invoke.DefaultExec{
50
+ RawExec: &invoke.RawExec{Stderr: os.Stderr},
51
+ PluginDecoder: version.PluginDecoder{},
52
+ },
53
+ )
54
return nil
55
}
56
0 commit comments