11
vendor/github.com/containerd/go-cni/opts.go
generated
vendored
11
vendor/github.com/containerd/go-cni/opts.go
generated
vendored
@@ -18,10 +18,13 @@ package cni
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
cnilibrary "github.com/containernetworking/cni/libcni"
|
||||
"github.com/containernetworking/cni/pkg/invoke"
|
||||
"github.com/containernetworking/cni/pkg/version"
|
||||
)
|
||||
|
||||
// Opt sets options for a CNI instance
|
||||
@@ -41,7 +44,13 @@ func WithInterfacePrefix(prefix string) Opt {
|
||||
func WithPluginDir(dirs []string) Opt {
|
||||
return func(c *libcni) error {
|
||||
c.pluginDirs = dirs
|
||||
c.cniConfig = &cnilibrary.CNIConfig{Path: dirs}
|
||||
c.cniConfig = cnilibrary.NewCNIConfig(
|
||||
dirs,
|
||||
&invoke.DefaultExec{
|
||||
RawExec: &invoke.RawExec{Stderr: os.Stderr},
|
||||
PluginDecoder: version.PluginDecoder{},
|
||||
},
|
||||
)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -93,7 +93,7 @@ github.com/containerd/continuity/testutil/loopback
|
||||
# github.com/containerd/fifo v1.0.0
|
||||
## explicit
|
||||
github.com/containerd/fifo
|
||||
# github.com/containerd/go-cni v1.1.2
|
||||
# github.com/containerd/go-cni v1.1.3
|
||||
## explicit
|
||||
github.com/containerd/go-cni
|
||||
# github.com/containerd/go-runc v1.0.0
|
||||
|
||||
Reference in New Issue
Block a user