Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v1.20.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NextHopFromPathAttributes

func NextHopFromPathAttributes(pathAttributes []bgppacket.PathAttributeInterface) string

NextHopFromPathAttributes returns the next hop address determined by the list of provided BGP path attributes.

func PrintBGPPeersCaps

func PrintBGPPeersCaps(w io.Writer, peers []*models.BgpPeer)

PrintBGPPeersCaps prints the capabilities of the provided BGP peers.

func PrintBGPPeersTable

func PrintBGPPeersTable(w *tabwriter.Writer, peers []*models.BgpPeer, printUptime bool)

PrintBGPPeersTable prints table of provided BGP peers in the provided tab writer.

func PrintBGPRoutePoliciesTable

func PrintBGPRoutePoliciesTable(w *tabwriter.Writer, policies []*models.BgpRoutePolicy)

PrintBGPRoutePoliciesTable prints table of provided BGP route policies in the provided tab writer.

func PrintBGPRoutesTable

func PrintBGPRoutesTable(w *tabwriter.Writer, routes []*models.BgpRoute, printPeer, printAge bool) error

PrintBGPRoutesTable prints table of provided BGP routes in the provided tab writer.

func ToAPIFamilies

func ToAPIFamilies(families []types.Family) []*models.BgpFamily

func ToAPIFamily

func ToAPIFamily(f *types.Family) (*models.BgpFamily, error)

func ToAPIPath

func ToAPIPath(p *types.Path) (*models.BgpPath, error)

func ToAPIPaths

func ToAPIPaths(ps []*types.Path) ([]*models.BgpPath, error)

func ToAPIRoute

func ToAPIRoute(r *types.Route, routerASN int64, neighbor string) (*models.BgpRoute, error)

func ToAPIRoutePolicies

func ToAPIRoutePolicies(policies []*types.RoutePolicy, routerASN int64) []*models.BgpRoutePolicy

func ToAPIRoutePolicy

func ToAPIRoutePolicy(policy *types.RoutePolicy, routerASN int64) *models.BgpRoutePolicy

func ToAPIRoutePolicyStatements

func ToAPIRoutePolicyStatements(statements []*types.RoutePolicyStatement) []*models.BgpRoutePolicyStatement

func ToAPIRoutes

func ToAPIRoutes(rs []*types.Route, routerASN int64, neighbor string) ([]*models.BgpRoute, error)

func ToAgentGetRoutesRequest

func ToAgentGetRoutesRequest(params restapi.GetBgpRoutesParams) (*types.GetRoutesRequest, error)

func ToAgentPath

func ToAgentPath(m *models.BgpPath) (*types.Path, error)

func ToAgentPaths

func ToAgentPaths(ms []*models.BgpPath) ([]*types.Path, error)

func ToAgentRoute

func ToAgentRoute(m *models.BgpRoute) (*types.Route, error)

func ToApiRoutePolicyAction

func ToApiRoutePolicyAction(a types.RoutePolicyAction) string

func ToApiRoutePolicyType

func ToApiRoutePolicyType(t types.RoutePolicyType) string

Types

type BGPHandlerInParams

type BGPHandlerInParams struct {
	Controller *agent.Controller
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL