Documentation
¶
Index ¶
- type PathID
- type PathRelation
- type PathState
- type PathStateInfo
- type PathTracker
- func (pt *PathTracker) AddNodeResult(pathID PathID, nodeKey string, result interface{})
- func (pt *PathTracker) AddNodeToPath(pathID PathID, nodeKey string)
- func (pt *PathTracker) CheckNodeVisited(pathID PathID, nodeKey string) bool
- func (pt *PathTracker) CompletePath(pathID PathID, success bool, err error)
- func (pt *PathTracker) GetNodePaths(nodeKey string) []PathID
- func (pt *PathTracker) GetPathDepth(pathID PathID) int
- func (pt *PathTracker) GetPathInfo(pathID PathID) (*PathStateInfo, error)
- func (pt *PathTracker) GetPathState(pathID PathID) (PathState, error)
- func (pt *PathTracker) GetStats() *PathTrackerStats
- func (pt *PathTracker) MergeNodeResults(nodeKey string) interface{}
- func (pt *PathTracker) StartPath(pathID PathID, parentPathID PathID, isECMP bool)
- type PathTrackerStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PathRelation ¶
type PathRelation struct {
ParentPathID PathID // 父路径
ChildPathIDs []PathID // 子路径(分支)
MergePathID PathID // 合并到的路径(如果与其他路径合并)
}
PathRelation 路径关系
type PathStateInfo ¶
type PathStateInfo struct {
PathID PathID
State PathState
ParentPathID PathID // 父路径ID(如果是从父路径分支)
BranchIndex int // 分支索引(同一节点的多个分支)
StartTime time.Time
EndTime time.Time
Error error
NodeCount int // 路径上的节点数量
IsECMP bool // 是否为ECMP路径
}
PathStateInfo 路径状态信息
type PathTracker ¶
type PathTracker struct {
// contains filtered or unexported fields
}
PathTracker 路径跟踪器
func (*PathTracker) AddNodeResult ¶
func (pt *PathTracker) AddNodeResult(pathID PathID, nodeKey string, result interface{})
AddNodeResult 添加节点处理结果
func (*PathTracker) AddNodeToPath ¶
func (pt *PathTracker) AddNodeToPath(pathID PathID, nodeKey string)
AddNodeToPath 将节点添加到路径
func (*PathTracker) CheckNodeVisited ¶
func (pt *PathTracker) CheckNodeVisited(pathID PathID, nodeKey string) bool
CheckNodeVisited 检查节点是否在特定路径上已访问
func (*PathTracker) CompletePath ¶
func (pt *PathTracker) CompletePath(pathID PathID, success bool, err error)
CompletePath 完成路径(成功或失败)
func (*PathTracker) GetNodePaths ¶
func (pt *PathTracker) GetNodePaths(nodeKey string) []PathID
GetNodePaths 获取访问过节点的所有路径
func (*PathTracker) GetPathDepth ¶
func (pt *PathTracker) GetPathDepth(pathID PathID) int
GetPathDepth 获取路径深度
func (*PathTracker) GetPathInfo ¶
func (pt *PathTracker) GetPathInfo(pathID PathID) (*PathStateInfo, error)
GetPathInfo 获取路径信息
func (*PathTracker) GetPathState ¶
func (pt *PathTracker) GetPathState(pathID PathID) (PathState, error)
GetPathState 获取路径状态
func (*PathTracker) GetStats ¶
func (pt *PathTracker) GetStats() *PathTrackerStats
GetStats 获取路径统计信息
func (*PathTracker) MergeNodeResults ¶
func (pt *PathTracker) MergeNodeResults(nodeKey string) interface{}
MergeNodeResults 合并节点在不同路径上的结果
Click to show internal directories.
Click to hide internal directories.