go.mod: github.com/containerd/go-cni v1.0.2

full diff: https://github.com/containerd/go-cni/compare/v1.0.1...v1.0.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2021-04-14 09:09:18 +02:00
parent 5c6ea7fdc1
commit 864a3322b3
21 changed files with 132 additions and 86 deletions

View File

@@ -36,11 +36,11 @@ type cniNetConfSyncer struct {
watcher *fsnotify.Watcher
confDir string
netPlugin cni.CNI
loadOpts []cni.CNIOpt
loadOpts []cni.Opt
}
// newCNINetConfSyncer creates cni network conf syncer.
func newCNINetConfSyncer(confDir string, netPlugin cni.CNI, loadOpts []cni.CNIOpt) (*cniNetConfSyncer, error) {
func newCNINetConfSyncer(confDir string, netPlugin cni.CNI, loadOpts []cni.Opt) (*cniNetConfSyncer, error) {
watcher, err := fsnotify.NewWatcher()
if err != nil {
return nil, errors.Wrap(err, "failed to create fsnotify watcher")

View File

@@ -544,7 +544,7 @@ func (c *criService) getSandboxRuntime(config *runtime.PodSandboxConfig, runtime
return handler, nil
}
func logDebugCNIResult(ctx context.Context, sandboxID string, result *cni.CNIResult) {
func logDebugCNIResult(ctx context.Context, sandboxID string, result *cni.Result) {
if logrus.GetLevel() < logrus.DebugLevel {
return
}

View File

@@ -139,7 +139,7 @@ type SandboxInfo struct {
RuntimeOptions interface{} `json:"runtimeOptions"`
Config *runtime.PodSandboxConfig `json:"config"`
RuntimeSpec *runtimespec.Spec `json:"runtimeSpec"`
CNIResult *cni.CNIResult `json:"cniResult"`
CNIResult *cni.Result `json:"cniResult"`
}
// toCRISandboxInfo converts internal container object information to CRI sandbox status response info map.

View File

@@ -73,6 +73,6 @@ func (c *criService) initPlatform() error {
}
// cniLoadOptions returns cni load options for the linux.
func (c *criService) cniLoadOptions() []cni.CNIOpt {
return []cni.CNIOpt{cni.WithLoNetwork, cni.WithDefaultConf}
func (c *criService) cniLoadOptions() []cni.Opt {
return []cni.Opt{cni.WithLoNetwork, cni.WithDefaultConf}
}

View File

@@ -28,6 +28,6 @@ func (c *criService) initPlatform() error {
}
// cniLoadOptions returns cni load options for the linux.
func (c *criService) cniLoadOptions() []cni.CNIOpt {
return []cni.CNIOpt{}
func (c *criService) cniLoadOptions() []cni.Opt {
return []cni.Opt{}
}

View File

@@ -47,6 +47,6 @@ func (c *criService) initPlatform() error {
}
// cniLoadOptions returns cni load options for the windows.
func (c *criService) cniLoadOptions() []cni.CNIOpt {
return []cni.CNIOpt{cni.WithDefaultConf}
func (c *criService) cniLoadOptions() []cni.Opt {
return []cni.Opt{cni.WithDefaultConf}
}

View File

@@ -34,7 +34,7 @@ func NewFakeCNIPlugin() *FakeCNIPlugin {
}
// Setup setups the network of PodSandbox.
func (f *FakeCNIPlugin) Setup(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) (*cni.CNIResult, error) {
func (f *FakeCNIPlugin) Setup(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) (*cni.Result, error) {
return nil, nil
}
@@ -49,7 +49,7 @@ func (f *FakeCNIPlugin) Status() error {
}
// Load loads the network config.
func (f *FakeCNIPlugin) Load(opts ...cni.CNIOpt) error {
func (f *FakeCNIPlugin) Load(opts ...cni.Opt) error {
return f.LoadErr
}

View File

@@ -60,7 +60,7 @@ type Metadata struct {
// RuntimeHandler is the runtime handler name of the pod.
RuntimeHandler string
// CNIresult resulting configuration for attached network namespace interfaces
CNIResult *cni.CNIResult
CNIResult *cni.Result
// ProcessLabel is the SELinux process label for the container
ProcessLabel string
}