l3plugin

package
v2.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 10 Imported by: 14 modules, 57 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPlugin = *NewPlugin()

DefaultPlugin is a default instance of IfPlugin.

Functions

This section is empty.

Types

type Config

type Config struct {
	Disabled      bool `json:"disabled"`
	GoRoutinesCnt int  `json:"go-routines-count"`
}

Config holds the l3plugin configuration.

type Deps

type Deps struct {
	infra.PluginDeps
	KVScheduler kvs.KVScheduler
	NsPlugin    nsplugin.API
	IfPlugin    ifplugin.API
	AddrAlloc   netalloc.AddressAllocator
}

Deps lists dependencies of the interface p.

type L3Plugin

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

L3Plugin configures Linux routes and ARP entries using Netlink API.

func NewPlugin

func NewPlugin(opts ...Option) *L3Plugin

NewPlugin creates a new Plugin with the provides Options

func (*L3Plugin) Close

func (p *L3Plugin) Close() error

Close does nothing here.

func (*L3Plugin) Init

func (p *L3Plugin) Init() error

Init initializes and registers descriptors for Linux ARPs and Routes.

type Option

type Option func(*L3Plugin)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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