mirror of
https://github.com/moby/moby.git
synced 2026-08-08 09:01:44 +00:00
libnetwork/osl: unify stubs for IfaceOption
Use the same signature for all platforms, but stub the nwIface type. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
package osl
|
||||
|
||||
// IfaceOption is a function option type to set interface options
|
||||
type IfaceOption func()
|
||||
@@ -14,9 +14,6 @@ import (
|
||||
"github.com/vishvananda/netns"
|
||||
)
|
||||
|
||||
// IfaceOption is a function option type to set interface options
|
||||
type IfaceOption func(i *nwIface)
|
||||
|
||||
type nwIface struct {
|
||||
srcName string
|
||||
dstName string
|
||||
|
||||
6
libnetwork/osl/interface_unsupported.go
Normal file
6
libnetwork/osl/interface_unsupported.go
Normal file
@@ -0,0 +1,6 @@
|
||||
//go:build !linux
|
||||
// +build !linux
|
||||
|
||||
package osl
|
||||
|
||||
type nwIface struct{}
|
||||
@@ -1,4 +0,0 @@
|
||||
package osl
|
||||
|
||||
// IfaceOption is a function option type to set interface options
|
||||
type IfaceOption func()
|
||||
@@ -17,6 +17,9 @@ const (
|
||||
SandboxTypeLoadBalancer = iota
|
||||
)
|
||||
|
||||
// IfaceOption is a function option type to set interface options.
|
||||
type IfaceOption func(i *nwIface)
|
||||
|
||||
// Sandbox represents a network sandbox, identified by a specific key. It
|
||||
// holds a list of Interfaces, routes etc, and more can be added dynamically.
|
||||
type Sandbox interface {
|
||||
|
||||
Reference in New Issue
Block a user