dplaneopts

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FECMode added in v0.5.1

type FECMode struct {
	Speed int      // Speed in Gbps.
	Lanes int      // Number of lanes.
	Modes []string // Supported modes.
}

type HardwareProfile added in v0.5.1

type HardwareProfile struct {
	// FECModes configures the support FECMode for a given speed and lanes combination.
	FECModes []*FECMode `yaml:"fec_modes"`
}

HardwareProfile is the "hardware" like config options.

type Option

type Option func(*Options) error

Option exposes additional configuration for the dataplane.

func WithAddrPort

func WithAddrPort(addrPort string) Option

WithAddrPort sets the address of the dataplane gRPC server Default: 127.0.0.1:0

func WithHardwareProfile added in v0.5.1

func WithHardwareProfile(file string) Option

WithHardwareProfile sets location of the hardware profile config

func WithHostifNetDevPortType

func WithHostifNetDevPortType(t fwdpb.PortType) Option

WithHostifNetDevPortType sets the lucius port type for saipb hostif NETDEV. Default: fwdpb.PortType_PORT_TYPE_TAP

func WithPortType

func WithPortType(t fwdpb.PortType) Option

WithPortType sets the lucius port type for saipb ports. Default: fwdpb.PortType_PORT_TYPE_KERNEL

func WithReconcilation

func WithReconcilation(rec bool) Option

WithReconcilation enables the gNMI reconcilation. Default: true

type Options

type Options struct {
	// AddrPort is the address of the gRPC server.
	AddrPort string
	// Reconcilation enabes gNMI reconcilation.
	Reconcilation bool
	// HostifNetDevType is the fwdpb type for the saipb hostif netdev types.
	HostifNetDevType fwdpb.PortType
	// PortType is the fwdpb type for the port type.
	PortType fwdpb.PortType
	// HardwareProfile is the "hardware" like config options.
	HardwareProfile *HardwareProfile
}

Options configures the dataplane

func ResolveOpts

func ResolveOpts(opts ...Option) *Options

ResolveOpts creates an option struct from the opts.

Jump to

Keyboard shortcuts

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