bridge

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupTAPs

func CleanupTAPs(vmIDs []string) []string

CleanupTAPs removes bridge TAP devices per VM ID; safe without a Bridge instance.

func GCModule

func GCModule(rootDir string) gc.Module[bridgeSnapshot]

GCModule returns a GC module that reclaims orphan bt* TAP devices. It does not require a Bridge instance — only rootDir for the lock file.

Types

type Bridge

type Bridge struct {
	// contains filtered or unexported fields
}

Bridge is TAP-on-bridge; requires a pre-existing bridge with DHCP + routing.

func New

func New(conf *config.Config, bridgeDev string) (*Bridge, error)

New: the bridge device must already exist.

func (*Bridge) Add added in v0.4.0

func (b *Bridge) Add(ctx context.Context, vmID string, vmCfg *types.VMConfig, specs ...network.AddSpec) (configs []*types.NetworkConfig, retErr error)

func (*Bridge) Delete

func (b *Bridge) Delete(_ context.Context, vmIDs []string) ([]string, error)

func (*Bridge) Inspect

func (b *Bridge) Inspect(_ context.Context, _ string) (*types.Network, error)

Inspect: bridge has no persistent records.

func (*Bridge) List

func (b *Bridge) List(_ context.Context) ([]*types.Network, error)

List: bridge has no persistent records.

func (*Bridge) Prepare added in v0.4.0

func (b *Bridge) Prepare(_ context.Context, _ string, _ *types.VMConfig) (string, error)

Prepare is a no-op (bridge has no netns).

func (*Bridge) RegisterGC

func (b *Bridge) RegisterGC(orch *gc.Orchestrator)

RegisterGC reclaims orphan bt* TAP devices.

func (*Bridge) Remove added in v0.4.0

func (b *Bridge) Remove(_ context.Context, vmID string, indices ...int) error

func (*Bridge) Type

func (b *Bridge) Type() string

func (*Bridge) Verify

func (b *Bridge) Verify(_ context.Context, vmID string) error

Jump to

Keyboard shortcuts

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