Documentation
¶
Overview ¶
Package macvlan provides Docker “macvlan”-driver specific network configuration options. Please see also the Docker macvlan driver documentation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithMode ¶
func WithMode(mode MACVLANMode) net.Opt
WithMode sets the MACVLAN mode; when unset, it defaults to “bridge” (=BridgeMode).
- BridgeMode is the default mode and allows the MACVLANs of the same “master” network interface to communicate other, but blocks all traffic between the host and one of its MACVLAN network interfaces.
- VEPAMode forwards all MACVLAN traffic to an external switch that must support hair-pinning; that is, the external switch must then forward traffic to other MACVLAN network interfaces back.
- PassthruMode is only allowed for one endpoint on the same master network interface. It forces the master network interface into promiscuous mode in order to bridge it or create VLAN network interfaces on top of it.
- PrivateMode doesn't allow any traffic between MACVLANs on the same master network interface.
See also: Docker's Macvlan network driver options.
func WithParent ¶
WithParent sets the name of the “parent” interface (and optional VLAN) to attach the MACVLAN “slave” interfaces to. In Linux parlance, the “parent” interface is commonly referred to as the “master”.
See also: Docker's Macvlan network driver options.
Types ¶
type MACVLANMode ¶
type MACVLANMode string
const ( BridgeMode MACVLANMode = "bridge" VEPAMode MACVLANMode = "vepa" PassthruMode MACVLANMode = "passthru" PrivateMode MACVLANMode = "private" )
Click to show internal directories.
Click to hide internal directories.