Documentation
¶
Index ¶
- func NewNetworker() network.Networker
- type T
- func (t *T) AllocatableRange(nodename string) (*net.IPNet, error)
- func (t *T) BackendDevName() string
- func (t *T) CNIConfigData() (interface{}, error)
- func (t *T) NodeAddr(nodename string) (net.IP, error)
- func (t *T) Peers() ([]network.Peer, error)
- func (t *T) Setup() error
- func (t *T) Teardown() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNetworker ¶
Types ¶
type T ¶
func (*T) AllocatableRange ¶
AllocatableRange returns the subnet this node was assigned in the network.
A routed_bridge slices its network, one subnet per node, and routes between them, so a node draws from its own slice and two nodes never draw the same address.
func (*T) BackendDevName ¶
func (*T) CNIConfigData ¶
CNIConfigData returns a cni network configuration, like
{
"cniVersion": "0.3.0",
"name": "net1",
"type": "bridge",
"bridge": "obr_net1",
"isGateway": true,
"ipMasq": false,
"ipam": {
"type": "host-local",
"subnet": "10.23.0.0/26",
"routes": [
{
"dst": "0.0.0.0/0"
},
{
"dst": "10.23.0.0/24",
"gw": "10.23.0.1"
}
]
}
}
func (*T) NodeAddr ¶
NodeAddr returns the address of nodename in the network, the first of the subnet the node was assigned.
func (*T) Peers ¶
Peers returns how this node reaches the other nodes of the network, as its setup made it: the tunnels and routes it set up.