exports

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IfClusterIndex

type IfClusterIndex struct {
	// interface name
	InterfaceName string
	// node name
	NodeName string
}

Object used to index interfaces in a cluster

func (IfClusterIndex) String

func (index IfClusterIndex) String() string

type Iface

type Iface struct {
	IfName      string
	IfMac       Mac
	IfIndex     int
	IfPci       PCIAddress
	IfPTPCaps   PTPCaps
	IfUp        bool
	IfMaster    string
	IfSlaveType string
}

type L2Info

type L2Info interface {
	// list of cluster interfaces indexed with a simple integer (X) for readability in the graph
	GetPtpIfList() []*PtpIf
	// list of unfiltered cluster interfaces indexed with a simple integer (X) for readability in the graph
	GetPtpIfListUnfiltered() map[string]*PtpIf
	// LANs identified in the graph
	GetLANs() *[][]int
	// List of port receiving PTP frames (assuming valid GM signal received)
	GetPortsGettingPTP() []*PtpIf
}

L2Info interface for L2 discovery configuration

type Mac

type Mac struct {
	Data string
}

func (Mac) String

func (mac Mac) String() string

type Neighbors

type Neighbors struct {
	Local  Iface
	Remote map[string]bool
	// PTP Announce data received on this interface, keyed by grandmaster identity.
	// Multiple GMs may announce on the same LAN.
	PtpAnnounces map[string]*PtpAnnounceData `json:"ptpAnnounces,omitempty"`
}

type PCIAddress

type PCIAddress struct {
	Device, Function, Description, Subsystem string
}

func (PCIAddress) String

func (pci PCIAddress) String() string

type PTPCaps

type PTPCaps struct {
	HwRx, HwTx, HwRawClock bool
}

func (PTPCaps) String

func (caps PTPCaps) String() string

type PtpAnnounceData added in v0.0.21

type PtpAnnounceData struct {
	DomainNumber            uint8  `json:"domainNumber"`
	GrandmasterPriority1    uint8  `json:"grandmasterPriority1"`
	ClockClass              uint8  `json:"clockClass"`
	ClockAccuracy           uint8  `json:"clockAccuracy"`
	OffsetScaledLogVariance uint16 `json:"offsetScaledLogVariance"`
	GrandmasterPriority2    uint8  `json:"grandmasterPriority2"`
	GrandmasterIdentity     string `json:"grandmasterIdentity"`
	StepsRemoved            uint16 `json:"stepsRemoved"`
	TimeSource              uint8  `json:"timeSource"`
}

PtpAnnounceData contains decoded fields from a PTP Announce message (IEEE 1588).

func (PtpAnnounceData) String added in v0.0.21

func (a PtpAnnounceData) String() string

type PtpIf

type PtpIf struct {
	// Index of the interface in the cluster (node/interface name)
	IfClusterIndex
	// Interface
	Iface
	// PTP Announce data received on this interface, keyed by grandmaster identity.
	// nil if no announce received.
	Announces map[string]*PtpAnnounceData `json:"-"`
}

Object representing a ptp interface within a cluster.

func (*PtpIf) String

func (iface *PtpIf) String() string

func (*PtpIf) String1

func (iface *PtpIf) String1() string

func (*PtpIf) StringFull

func (iface *PtpIf) StringFull(indent int) string

type SolverConfig

type SolverConfig interface {
	// problem definition
	InitProblem(string, [][][]int, []int)
	// L2 configuration
	SetL2Config(L2Info)
	// Run solver on problem
	Run(string)
	// Prints all solutions
	PrintAllSolutions()
	// Prints first solution only
	PrintFirstSolution()
	// map storing solutions
	GetSolutions() map[string]*[][]int
}

SolverConfig interface for graph solver configuration

Jump to

Keyboard shortcuts

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