config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package config contains the configuration tree

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStatusString added in v1.0.1

func GetStatusString(enabled bool) string

GetStatusString returns port status string based on the enabled flag: UP or DOWN

func NewSwitchConfig

func NewSwitchConfig(ports map[simapi.PortID]*simapi.Port) *configtree.Node

NewSwitchConfig creates a new switch skeleton configuration and returns its root node

func SetPortStatus added in v1.0.1

func SetPortStatus(interfaceNode *configtree.Node, portStatus string)

SetPortStatus applies port status to the given interface node

func SimulateTrafficCounters added in v0.1.3

func SimulateTrafficCounters(ctx context.Context, delay time.Duration, node *configtree.Node)

SimulateTrafficCounters simulates a select set of traffic-related counters for all ports under the given root configuration

Types

This section is empty.

Jump to

Keyboard shortcuts

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