libnetwork/osl: unify stubs for NeighOption
Use the same signature for all platforms, but stub the neigh type. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
0ea41eaa51
commit
8142051a3b
5 changed files with 9 additions and 11 deletions
|
@ -1,4 +0,0 @@
|
|||
package osl
|
||||
|
||||
// NeighOption is a function option type to set neighbor options
|
||||
type NeighOption func()
|
|
@ -20,9 +20,6 @@ func (n NeighborSearchError) Error() string {
|
|||
return fmt.Sprintf("Search neighbor failed for IP %v, mac %v, present in db:%t", n.ip, n.mac, n.present)
|
||||
}
|
||||
|
||||
// NeighOption is a function option type to set interface options
|
||||
type NeighOption func(nh *neigh)
|
||||
|
||||
type neigh struct {
|
||||
dstIP net.IP
|
||||
dstMac net.HardwareAddr
|
||||
|
|
6
libnetwork/osl/neigh_unsupported.go
Normal file
6
libnetwork/osl/neigh_unsupported.go
Normal file
|
@ -0,0 +1,6 @@
|
|||
//go:build !linux
|
||||
// +build !linux
|
||||
|
||||
package osl
|
||||
|
||||
type neigh struct{}
|
|
@ -1,4 +0,0 @@
|
|||
package osl
|
||||
|
||||
// NeighOption is a function option type to set neighbor options
|
||||
type NeighOption func()
|
|
@ -20,6 +20,9 @@ const (
|
|||
// IfaceOption is a function option type to set interface options.
|
||||
type IfaceOption func(i *nwIface)
|
||||
|
||||
// NeighOption is a function option type to set neighbor options.
|
||||
type NeighOption func(nh *neigh)
|
||||
|
||||
// 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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue