iptablesplugin

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPlugin = *NewPlugin()

DefaultPlugin is a default instance of IPTablesPlugin.

Functions

This section is empty.

Types

type Config

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

Config holds the plugin configuration.

type Deps

type Deps struct {
	infra.PluginDeps
	KVScheduler kvs.KVScheduler
	NsPlugin    nsplugin.API
}

Deps lists dependencies of the plugin.

type IPTablesPlugin

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

IPTablesPlugin configures Linux iptables rules.

func NewPlugin

func NewPlugin(opts ...Option) *IPTablesPlugin

NewPlugin creates a new Plugin with the provides Options.

func (*IPTablesPlugin) Close

func (p *IPTablesPlugin) Close() error

Close does nothing here.

func (*IPTablesPlugin) Init

func (p *IPTablesPlugin) Init() error

Init initializes and registers descriptors and handlers for Linux iptables rules.

type Option

type Option func(*IPTablesPlugin)

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