Documentation ¶
Index ¶
- func Chunk[E any](values []E, size int) ([][]E, error)
- func DeleteByIndex[T any](slice []T, index int) []T
- func Exists[T any](slice []T, predicate func(T) bool) (resultIndex int, ok bool)
- func Filter[T any](slice []T, predicate func(T) bool) (res []T)
- func Find[T any](slice []T, predicate func(T) bool) (result T, resultIndex int, ok bool)
- func In[Item comparable](items []Item, item Item) bool
- type AfiAndSafi
- type BGPAddressFamily
- type BGPVrfSummary
- type BGPVrfSummarySpec
- type Cli
- func (frr *Cli) ExecuteWithJSON(args []string) []byte
- func (frr *Cli) ShowBGPSummary(vrf string) (BGPVrfSummary, error)
- func (frr *Cli) ShowEVPNVNIDetail() (EVPNVniDetail, error)
- func (frr *Cli) ShowRouteSummary(vrf string) (VRFDualStackRouteSummary, error)
- func (frr *Cli) ShowVRFs(vrfName string) (VrfVni, error)
- type Configuration
- type ConfigurationError
- type DualStackRouteSummary
- type EVPNVniDetail
- type Manager
- func (m *Manager) Configure(in Configuration, nm *nl.Manager, nwopCfg *config.Config) (bool, error)
- func (m *Manager) GetStatusFRR() (activeState, subState string, err error)
- func (m *Manager) Init(mgmtVrf string) error
- func (m *Manager) ListBGPNeighbors(vrf string) (bgpSummary BGPVrfSummary, err error)
- func (m *Manager) ListRouteSummary(vrf string) ([]route.Information, error)
- func (m *Manager) ListVrfs() ([]VrfVniSpec, error)
- func (m *Manager) ReloadFRR() error
- func (m *Manager) RestartFRR() error
- type Peer
- type PrefixList
- type PrefixedRouteItem
- type RouteSummaries
- type RouteSummary
- type VRFConfiguration
- type VRFDualStackRouteSummary
- type VrfVni
- type VrfVniSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteByIndex ¶ added in v0.2.0
func In ¶ added in v0.2.0
func In[Item comparable](items []Item, item Item) bool
Types ¶
type AfiAndSafi ¶ added in v0.2.0
type AfiAndSafi struct { RouterID string `json:"routerId"` As int64 `json:"as"` VrfID int `json:"vrfId"` VrfName string `json:"vrfName"` TableVersion int `json:"tableVersion"` RibCount int `json:"ribCount"` RibMemory int `json:"ribMemory"` PeerCount int `json:"peerCount"` PeerMemory int `json:"peerMemory"` PeerGroupCount int `json:"peerGroupCount"` PeerGroupMemory int `json:"peerGroupMemory"` Peers map[string]Peer `json:"peers"` FailedPeers int `json:"failedPeers"` DisplayedPeers int `json:"displayedPeers"` TotalPeers int `json:"totalPeers"` DynamicPeers int `json:"dynamicPeers"` BestPath bestPath `json:"bestPath"` }
type BGPAddressFamily ¶ added in v0.2.0
type BGPAddressFamily int
bgpAF == bgpAddressFamily.
const ( IPv4Unicast BGPAddressFamily = iota IPv4Multicast IPv6Unicast IPv6Multicast L2VpnEvpn Unknown )
func BGPAddressFamilyValues ¶ added in v0.2.0
func BGPAddressFamilyValues() (families []BGPAddressFamily)
func (BGPAddressFamily) Afi ¶ added in v0.2.0
func (af BGPAddressFamily) Afi() string
func (BGPAddressFamily) Safi ¶ added in v0.2.0
func (af BGPAddressFamily) Safi() string
func (BGPAddressFamily) String ¶ added in v0.2.0
func (af BGPAddressFamily) String() string
type BGPVrfSummary ¶ added in v0.2.0
type BGPVrfSummary map[string]BGPVrfSummarySpec
type BGPVrfSummarySpec ¶ added in v0.2.0
type BGPVrfSummarySpec map[string]AfiAndSafi
type Cli ¶ added in v0.2.0
type Cli struct {
// contains filtered or unexported fields
}
func (*Cli) ExecuteWithJSON ¶ added in v0.2.7
func (*Cli) ShowBGPSummary ¶ added in v0.2.0
func (frr *Cli) ShowBGPSummary(vrf string) (BGPVrfSummary, error)
func (*Cli) ShowEVPNVNIDetail ¶ added in v0.2.0
func (frr *Cli) ShowEVPNVNIDetail() (EVPNVniDetail, error)
func (*Cli) ShowRouteSummary ¶ added in v0.2.3
func (frr *Cli) ShowRouteSummary(vrf string) (VRFDualStackRouteSummary, error)
type Configuration ¶ added in v0.2.0
type Configuration struct { ASN int VRFs []VRFConfiguration HasCommunityDrop bool }
type ConfigurationError ¶ added in v0.2.11
type ConfigurationError struct {
// contains filtered or unexported fields
}
func (*ConfigurationError) Error ¶ added in v0.2.11
func (r *ConfigurationError) Error() string
type DualStackRouteSummary ¶ added in v0.2.3
type DualStackRouteSummary struct { IPv4 RouteSummaries `json:"ipv4"` IPv6 RouteSummaries `json:"ipv6"` Table string `json:"table,omitempty"` }
type EVPNVniDetail ¶ added in v0.2.0
type EVPNVniDetail struct { Vni int `json:"vni"` Type string `json:"type"` Vrf string `json:"vrf"` VxlanInterface string `json:"vxlanInterface"` Ifindex int `json:"ifindex"` SviInterface string `json:"sviInterface"` SviIfindex int `json:"sviIfindex"` VtepIP string `json:"vtepIp"` McastGroup string `json:"mcastGroup"` AdvertiseGatewayMacip string `json:"advertiseGatewayMacip"` AdvertiseSviMacip string `json:"advertiseSviMacip"` NumMacs int `json:"numMacs"` NumArpNd int `json:"numArpNd"` NumRemoteVteps []string `json:"numRemoteVteps"` }
type Manager ¶ added in v0.2.0
type Manager struct { ConfigPath string TemplatePath string Cli *Cli // contains filtered or unexported fields }
func NewFRRManager ¶
func NewFRRManager() *Manager
func (*Manager) GetStatusFRR ¶ added in v0.2.0
func (*Manager) ListBGPNeighbors ¶ added in v0.2.3
func (m *Manager) ListBGPNeighbors(vrf string) (bgpSummary BGPVrfSummary, err error)
func (*Manager) ListRouteSummary ¶ added in v0.2.3
func (m *Manager) ListRouteSummary(vrf string) ([]route.Information, error)
func (*Manager) ListVrfs ¶ added in v0.2.0
func (m *Manager) ListVrfs() ([]VrfVniSpec, error)
func (*Manager) RestartFRR ¶ added in v0.2.0
type Peer ¶ added in v0.2.0
type Peer struct { Hostname string `json:"hostname"` RemoteAs int64 `json:"remoteAs"` LocalAs int64 `json:"localAs"` Version int `json:"version"` MsgRcvd int `json:"msgRcvd"` MsgSent int `json:"msgSent"` TableVersion int `json:"tableVersion"` Outq int `json:"outq"` Inq int `json:"inq"` PeerUptime string `json:"peerUptime"` PeerUptimeMsec int `json:"peerUptimeMsec"` PeerUptimeEstablishedEpoch int `json:"peerUptimeEstablishedEpoch"` PfxRcd int `json:"pfxRcd"` PfxSnt int `json:"pfxSnt"` State string `json:"state"` PeerState string `json:"peerState"` ConnectionsEstablished int `json:"connectionsEstablished"` ConnectionsDropped int `json:"connectionsDropped"` IDType string `json:"idType"` }
type PrefixList ¶
type PrefixList struct { Items []PrefixedRouteItem Seq int Community *string }
type PrefixedRouteItem ¶
type RouteSummaries ¶ added in v0.2.3
type RouteSummaries struct { Routes []RouteSummary `json:"routes"` RoutesTotal int `json:"routesTotal"` RoutesTotalFib int `json:"routesTotalFib"` }
type RouteSummary ¶ added in v0.2.3
type VRFConfiguration ¶
type VRFConfiguration struct { Name string VNI int MTU int RT string IsTaaS bool AggregateIPv4 []string AggregateIPv6 []string Import []PrefixList Export []PrefixList }
func (*VRFConfiguration) ShouldDefineRT ¶
func (v *VRFConfiguration) ShouldDefineRT() bool
func (*VRFConfiguration) ShouldTemplateVRF ¶
func (v *VRFConfiguration) ShouldTemplateVRF() bool
type VRFDualStackRouteSummary ¶ added in v0.2.3
type VRFDualStackRouteSummary map[string]DualStackRouteSummary
type VrfVni ¶ added in v0.2.0
type VrfVni struct {
Vrfs []VrfVniSpec `json:"vrfs"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.