iptables

package
v0.0.0-...-22c38b1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIptablesNotFound = errors.New("[iptables] Binary not found")
	ErrIptablesSnat     = errors.New("[iptables] Error when inserting SNAT rule")
	ErrIptablesRule     = errors.New("[iptables] Error adding rule")
)
View Source
var (
	ADD = "-A"
	DEL = "-D"
)

Defines iptables actions

Functions

This section is empty.

Types

type IptablesMngr

type IptablesMngr struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(config *config.BalancerConfig) (*IptablesMngr, error)

func (IptablesMngr) Sync

func (i IptablesMngr) Sync(s state.State) error

Sync syncs all iptables rules

type SnatRule

type SnatRule struct {
	// contains filtered or unexported fields
}

type Syncer

type Syncer interface {
	Sync(state state.State) error
}

Jump to

Keyboard shortcuts

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