transdep/graph/analysis_result.go

37 lines
675 B
Go
Raw Normal View History

2018-01-23 20:25:00 +00:00
package graph
import "net"
type CriticalIP struct {
IP net.IP `json:"ip"`
}
type CriticalName struct {
Name string `json:"name"`
}
type CriticalAlias struct {
Source string `json:"source"`
Target string `json:"target"`
}
type CriticalASN struct {
ASN int `json:"asn"`
}
type CriticalPrefix struct {
Prefix net.IP `json:"prefix"`
}
type CriticalNode interface {
isCriticalNode()
}
func (n CriticalIP) isCriticalNode() {}
func (n CriticalName) isCriticalNode() {}
func (n CriticalAlias) isCriticalNode() {}
func (n CriticalASN) isCriticalNode() {}
func (n CriticalPrefix) isCriticalNode() {}
// Cycles are also critical nodes
func (c *Cycle) isCriticalNode() {}