Documentation
¶
Index ¶
- Constants
- func ParseDistanceMatrix(input string) ([]mtypes.PongMsg, error)
- func Solve(filePath string, pe bool) error
- type ByDuration
- type EgHeader
- type Fullroute
- type IG
- func (g *IG) CheckAnyShouldUpdate(withCooldown bool) bool
- func (g *IG) FloydWarshall(again bool) (dist mtypes.DistTable, next mtypes.NextHopTable, err error)
- func (g *IG) GetBoardcastList(id mtypes.Vertex) (tosend map[mtypes.Vertex]bool)
- func (g *IG) GetBoardcastThroughList(self_id mtypes.Vertex, in_id mtypes.Vertex, src_id mtypes.Vertex) (tosend map[mtypes.Vertex]bool, errs []error)
- func (g *IG) GetCurrentTime() time.Time
- func (g *IG) GetDtst() mtypes.DistTable
- func (g *IG) GetEdges(isOld bool, withAC bool) (edges map[mtypes.Vertex]map[mtypes.Vertex]float64)
- func (g *IG) GetNHTable(recalculate bool) mtypes.NextHopTable
- func (g *IG) GetWeightType(x float64) (y float64)
- func (g *IG) InitNTP()
- func (g *IG) Neighbors(v mtypes.Vertex) (vs []mtypes.Vertex)
- func (g *IG) Next(u, v mtypes.Vertex) mtypes.Vertex
- func (g *IG) OldWeight(u, v mtypes.Vertex, withAC bool) (ret float64)
- func (g *IG) Path(u, v mtypes.Vertex) (path []mtypes.Vertex, err error)
- func (g *IG) RecalculateNhTable(checkchange bool) (changed bool)
- func (g *IG) RemoveAllNegativeValue()
- func (g *IG) RemoveVirt(v mtypes.Vertex, recalculate bool, checkchange bool) (changed bool)
- func (g *IG) RoutineSyncTime()
- func (g *IG) SetNHTable(nh mtypes.NextHopTable)
- func (g *IG) SetOldWeight(u, v mtypes.Vertex, weight float64)
- func (g *IG) SetWeight(u, v mtypes.Vertex, weight float64)
- func (g *IG) ShouldUpdate(oldval float64, newval float64, withCooldown bool) bool
- func (g *IG) SyncTime(url string, timeout time.Duration)
- func (g *IG) SyncTimeMultiple(count int)
- func (g *IG) UpdateLatency(src mtypes.Vertex, dst mtypes.Vertex, val float64, TimeToAlive float64, ...) (changed bool)
- func (g *IG) UpdateLatencyMulti(pong_info []mtypes.PongMsg, recalculate bool, checkchange bool) (changed bool)
- func (g *IG) Vertices() map[mtypes.Vertex]bool
- func (g *IG) Weight(u, v mtypes.Vertex, withAC bool) (ret float64)
- type Latency
- type Usage
Constants ¶
View Source
const EgHeaderLen = 4
Variables ¶
This section is empty.
Functions ¶
func ParseDistanceMatrix ¶ added in v0.3.3
Types ¶
type ByDuration ¶
func (ByDuration) Len ¶
func (a ByDuration) Len() int
func (ByDuration) Less ¶
func (a ByDuration) Less(i, j int) bool
func (ByDuration) Swap ¶
func (a ByDuration) Swap(i, j int)
type Fullroute ¶
type Fullroute struct { Next mtypes.NextHopTable `yaml:"NextHopTable"` Dist mtypes.DistTable `yaml:"DistanceTable"` }
type IG ¶
type IG struct { Vert map[mtypes.Vertex]bool SuperNodeInfoTimeout time.Duration RecalculateCoolDown time.Duration TimeoutCheckInterval time.Duration NhTableExpire time.Time IsSuperMode bool // contains filtered or unexported fields }
IG is a graph of integers that satisfies the Graph interface.
func NewGraph ¶
func NewGraph(num_node int, IsSuperMode bool, theconfig mtypes.GraphRecalculateSetting, ntpinfo mtypes.NTPInfo, loglevel mtypes.LoggerInfo) (*IG, error)
func (*IG) CheckAnyShouldUpdate ¶
func (*IG) FloydWarshall ¶
func (*IG) GetBoardcastList ¶
func (*IG) GetBoardcastThroughList ¶
func (*IG) GetCurrentTime ¶
func (*IG) GetNHTable ¶
func (g *IG) GetNHTable(recalculate bool) mtypes.NextHopTable
func (*IG) GetWeightType ¶
func (*IG) RecalculateNhTable ¶
func (*IG) RemoveAllNegativeValue ¶
func (g *IG) RemoveAllNegativeValue()
func (*IG) RemoveVirt ¶
func (*IG) RoutineSyncTime ¶
func (g *IG) RoutineSyncTime()
func (*IG) SetNHTable ¶
func (g *IG) SetNHTable(nh mtypes.NextHopTable)
func (*IG) ShouldUpdate ¶
func (*IG) SyncTimeMultiple ¶
func (*IG) UpdateLatency ¶
func (*IG) UpdateLatencyMulti ¶
type Usage ¶
type Usage uint8
func (Usage) IsControl_Edge2Edge ¶ added in v0.3.3
func (Usage) IsControl_Edge2Super ¶ added in v0.3.3
func (Usage) IsControl_Super2Edge ¶ added in v0.3.3
Click to show internal directories.
Click to hide internal directories.