Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNetworker ¶
Types ¶
type T ¶
func (*T) AllocatableRange ¶
AllocatableRange returns the whole subnet of the network.
A bridge network is node local and its addresses are not routable: the bridge is per node, nothing carries the subnet between nodes, and the same address on two nodes never meets. So every node draws from all of it, and the slicing a routed_bridge needs would only make the range smaller for no gain.
func (*T) BackendDevName ¶
func (*T) CNIConfigData ¶
CNIConfigData returns a cni network configuration, like
{
"bridge": "cni0",
"cniVersion": "0.3.0",
"ipMasq": false,
"name": "mynet",
"ipam": {
"routes": [
{"dst": "0.0.0.0/0"}
],
"subnet": "10.22.0.0/16",
"type": "host-local"
},
"isGateway": true,
"type": "bridge"
}
func (*T) IsNodeLocal ¶
IsNodeLocal says the addresses of a bridge network are node local: every node holds the whole subnet on a bridge of its own, and nothing routes it between them. The traffic leaving it for another network is masqueraded, for the answers to come back.