Documentation
¶
Index ¶
- func CreateIP4Chain(table, chain string)
- func CreateIP6Chain(table, chain string)
- func DeleteIP4Tables(rules []IPTablesRule) error
- func DeleteIP6Tables(rules []IPTablesRule) error
- func SetupAndEnsureIP4Tables(getRules func() []IPTablesRule, resyncPeriod int)
- func SetupAndEnsureIP6Tables(getRules func() []IPTablesRule, resyncPeriod int)
- type IPTables
- type IPTablesError
- type IPTablesRestore
- type IPTablesRestoreRuleSpec
- type IPTablesRestoreRules
- type IPTablesRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateIP4Chain ¶
func CreateIP4Chain(table, chain string)
func CreateIP6Chain ¶
func CreateIP6Chain(table, chain string)
func DeleteIP4Tables ¶
func DeleteIP4Tables(rules []IPTablesRule) error
DeleteIP4Tables delete specified iptables rules
func DeleteIP6Tables ¶
func DeleteIP6Tables(rules []IPTablesRule) error
DeleteIP6Tables delete specified iptables rules
func SetupAndEnsureIP4Tables ¶
func SetupAndEnsureIP4Tables(getRules func() []IPTablesRule, resyncPeriod int)
func SetupAndEnsureIP6Tables ¶
func SetupAndEnsureIP6Tables(getRules func() []IPTablesRule, resyncPeriod int)
Types ¶
type IPTables ¶
type IPTables interface { AppendUnique(table string, chain string, rulespec ...string) error ChainExists(table, chain string) (bool, error) ClearChain(table, chain string) error Delete(table string, chain string, rulespec ...string) error Exists(table string, chain string, rulespec ...string) (bool, error) }
type IPTablesError ¶
type IPTablesRestore ¶
type IPTablesRestore interface { // ApplyWithoutFlush apply without flush chains ApplyWithoutFlush(rules IPTablesRestoreRules) error }
IPTablesRestore wrapper for iptables-restore
func NewIPTablesRestoreWithProtocol ¶
func NewIPTablesRestoreWithProtocol(protocol iptables.Protocol) (IPTablesRestore, error)
NewIPTablesRestoreWithProtocol build new IPTablesRestore for supplied proto
type IPTablesRestoreRuleSpec ¶
type IPTablesRestoreRuleSpec []string
IPTablesRestoreRuleSpec represents one rule spec delimited by space
type IPTablesRestoreRules ¶
type IPTablesRestoreRules map[string][]IPTablesRestoreRuleSpec
IPTablesRestoreRules represents iptables-restore table block
type IPTablesRule ¶
type IPTablesRule struct {
// contains filtered or unexported fields
}
func ForwardRules ¶
func ForwardRules(flannelNetwork string) []IPTablesRule
func MasqIP6Rules ¶
func MasqIP6Rules(cluster_cidrs []ip.IP6Net, lease *lease.Lease) []IPTablesRule
Click to show internal directories.
Click to hide internal directories.