bundle

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

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

Bundle is the standard YANET distribution bundle of built-in modules and devices.

It instantiates each module/device from config and exposes them uniformly as a slice of gateway.Service.

func NewBundle

func NewBundle(
	modulesCfg ModulesConfig,
	devicesCfg DevicesConfig,
	options ...Option,
) (*Bundle, error)

NewBundle constructs every bundled module and device from the given config.

func (*Bundle) Services

func (m *Bundle) Services() []gateway.Service

Services returns all services from the bundle, ready to be registered with the gateway via gateway.WithService.

type DevicesConfig

type DevicesConfig struct {
	// Plain is the configuration for the plain device.
	Plain xcfg.Optional[plain.Config] `yaml:"plain"`
	// Vlan is the configuration for the vlan device.
	Vlan xcfg.Optional[vlan.Config] `yaml:"vlan"`
	// Trafgen is the configuration for the traffic generator device.
	Trafgen xcfg.Optional[trafgen.Config] `yaml:"trafgen"`
}

DevicesConfig describes built-in devices in the standard YANET bundle.

type ModulesConfig

type ModulesConfig struct {
	// Route is the configuration for the route module.
	Route xcfg.Optional[route.Config] `yaml:"route"`
	// RouteMPLS is the configuration for the route mpls module.
	RouteMPLS xcfg.Optional[route_mpls.Config] `yaml:"route-mpls"`
	// Decap is the configuration for the decap module.
	Decap xcfg.Optional[decap.Config] `yaml:"decap"`
	// DSCP is the configuration for the dscp module.
	DSCP xcfg.Optional[dscp.Config] `yaml:"dscp"`
	// Forward is the configuration for the forward module.
	Forward xcfg.Optional[forward.Config] `yaml:"forward"`
	// Mirror is the configuration for the mirror module.
	Mirror xcfg.Optional[mirror.Config] `yaml:"mirror"`
	// NAT64 is the configuration for the NAT64 module.
	NAT64 xcfg.Optional[nat64.Config] `yaml:"nat64"`
	// Pdump is the configuration for the packet dump module.
	Pdump xcfg.Optional[pdump.Config] `yaml:"pdump"`
	// ACL is the configuration for the acl module.
	ACL xcfg.Optional[acl.Config] `yaml:"acl"`
	// FWState is the configuration for the fwstate module.
	FWState xcfg.Optional[fwstate.Config] `yaml:"fwstate"`
	// L3B is the configuration for the l3b module.
	L3B xcfg.Optional[l3b.Config] `yaml:"l3b"`
	// Blackhole is the configuration for the blackhole module.
	Blackhole xcfg.Optional[blackhole.Config] `yaml:"blackhole"`
	// Unrdup is the configuration for the unrdup module.
	Unrdup xcfg.Optional[unrdup.Config] `yaml:"unrdup"`
}

ModulesConfig describes built-in modules in the standard YANET bundle.

type Option

type Option func(*bundleOptions)

Option configures the NewBundle constructor.

func WithLog

func WithLog(log *zap.Logger) Option

WithLog sets the logger for the bundle.

Jump to

Keyboard shortcuts

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