vppl3bgp

package
v0.0.0-...-0dae26e Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

README

VPP L3 BGP

Implements the Vpp sample service plugin that allows plugin to render learned IP-based routes to l3 plugin. Plugin retrieves the information from a Watcher plugin and publish it to l3 plugin, acting as a translator. Plugin provides core agent functionality.

To acquire IP-based routes been advertized to l3 plugin we must do 2 things:

  1. Create plugin implementing Watcher interface
  2. Create vppl3bgp plugin injecting watcher plugin into constructor vppl3bgp.New(...), i.e.:
...
	goBgpPlugin := gobgp.New(gobgp.Deps{
		PluginInfraDeps: deps,
		SessionConfig:   goBgpConfig})

	// Create BGP-to-L3 plugin that is plugin of the Vpp Agent
	bgptol3 := vppl3bgp.New(vppl3bgp.Deps{
		PluginInfraDeps: deps,
		Watcher:         goBgpPlugin,
	})
...

For further usage please look into our example.

Documentation

Overview

Package vppl3bgp implements the Vpp sample service plugin that allows plugin to render learned IP-based routes to l3 plugin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(deps Deps) core.NamedPlugin

New creates Plugin with learned IP-based route to l3 plugin rendering functionality by default. Renderer can be injected via Dependencies <deps>

Types

type Deps

type Deps struct {
	local.PluginInfraDeps //inject
	Watcher               bgp.Watcher
	Renderer              func(*bgp.ReachableIPRoute) //inject optional (mainly for testing purposes)
}

Deps combines all needed dependencies for Plugin struct. These dependencies should be injected into Plugin by using constructor's Deps parameter.

Jump to

Keyboard shortcuts

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