Documentation ¶
Index ¶
- type Cable
- type CableEnd
- type Circuit
- type Colo
- type Device
- type FrontPort
- type IP
- type Interface
- type InterfaceUnit
- type MetaData
- type Pop
- type Prefix
- type RearPort
- type Site
- type Topology
- func (t *Topology) AddColoIfNotExists(id uint16, name string, popName string) *Colo
- func (t *Topology) AddDeviceIfNotExists(name string) *Device
- func (t *Topology) AddPopIfNotExists(name string) *Pop
- func (t *Topology) AddSiteIfNotExists(name string) *Site
- func (t *Topology) DeviceAndInterfaceExists(devName string, ifName string) error
- func (t *Topology) FindInterfaceUnitByMetaDataAndRole(key string, value string, role string) []*InterfaceUnit
- func (t *Topology) GetColo(id uint16) *Colo
- func (t *Topology) GetDevice(name string) *Device
- func (t *Topology) ToProto() *octopuspb.Topology
- type VLANTag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CableEnd ¶
type CableEnd struct { DeviceName string EndpointName string EndpointType octopuspb.CableEndpointType }
type Circuit ¶
func NewCircuit ¶
type Colo ¶
type Device ¶
type Device struct { Name string Status string Role string Platform string DeviceType string Colo *Colo Site *Site Interfaces map[string]*Interface FrontPorts map[string]*FrontPort RearPorts map[string]*RearPort MetaData *MetaData }
func (*Device) AddInterfaceItNotExists ¶
func (*Device) GetInterface ¶
type Interface ¶
type Interface struct { Name string Type string LAGMemberOf string Units map[VLANTag]*InterfaceUnit MetaData *MetaData }
func (*Interface) AddIPAddressIfNotExists ¶
func (*Interface) AddUnitIfNotExists ¶
func (iface *Interface) AddUnitIfNotExists(vlanTag VLANTag) *InterfaceUnit
type InterfaceUnit ¶
type InterfaceUnit struct { VLANTag ID uint32 IPv4Addresses []IP IPv6Addresses []IP MetaData *MetaData }
func (*InterfaceUnit) ToProto ¶
func (unit *InterfaceUnit) ToProto() *octopuspb.InterfaceUnit
type MetaData ¶
func NewMetaData ¶
func NewMetaData() *MetaData
type Topology ¶
type Topology struct { Timestamp time.Time Sites map[string]*Site Pops map[string]*Pop Colos map[uint16]*Colo Nodes map[string]*Device Interfaces map[int64]*Interface DevicesByInterfaceID map[int64]*Device Cables map[string]*Cable Prefixes map[int64]*Prefix Circuits map[string]*Circuit }
func NewTopology ¶
func NewTopology() *Topology
func (*Topology) AddColoIfNotExists ¶
func (*Topology) AddDeviceIfNotExists ¶
GetAddDevice will return the pointer to the Device with the given name. If no device with that name currently exists, it will be created.
func (*Topology) AddPopIfNotExists ¶
func (*Topology) AddSiteIfNotExists ¶
func (*Topology) DeviceAndInterfaceExists ¶
func (*Topology) FindInterfaceUnitByMetaDataAndRole ¶
func (t *Topology) FindInterfaceUnitByMetaDataAndRole(key string, value string, role string) []*InterfaceUnit
Click to show internal directories.
Click to hide internal directories.