stnplugin

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPlugin = *NewPlugin()

DefaultPlugin is a default instance of STN plugin.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	infra.PluginDeps
	KVScheduler kvs.KVScheduler
	GoVppmux    govppmux.API
	IfPlugin    ifplugin.API
	StatusCheck statuscheck.PluginStatusWriter // optional
}

Deps lists dependencies of the STN plugin.

type Option

type Option func(*STNPlugin)

Option is a function that can be used in NewPlugin to customize Plugin.

func UseDeps

func UseDeps(f func(*Deps)) Option

UseDeps returns Option that can inject custom dependencies.

type STNPlugin

type STNPlugin struct {
	Deps
	// contains filtered or unexported fields
}

STNPlugin configures VPP STN rules using GoVPP.

func NewPlugin

func NewPlugin(opts ...Option) *STNPlugin

NewPlugin creates a new Plugin with the provided Options.

func (*STNPlugin) AfterInit

func (p *STNPlugin) AfterInit() error

AfterInit registers plugin with StatusCheck.

func (*STNPlugin) Init

func (p *STNPlugin) Init() (err error)

Init registers STN-related descriptors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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