networkbridge

package
v3.0.0-rc39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNetworker

func NewNetworker() network.Networker

Types

type T

type T struct {
	network.T
}

func New

func New() *T

func (*T) AllocatableRange

func (t *T) AllocatableRange(_ string) (*net.IPNet, error)

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 *T) BackendDevName() string

func (*T) CNIConfigData

func (t *T) CNIConfigData() (interface{}, error)

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) IsIP6

func (t *T) IsIP6() bool

func (*T) Setup

func (t *T) Setup() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL