Documentation ¶
Index ¶
- func BytesFromRules(rules map[string]*RuleSet) []byte
- func GetSaveLines(table util.Table, save []byte) (map[string]*RuleSet, error)
- func NewMetrics(lbKind, configKey string) *metrics
- func ReadLine(readIndex int, byteArray []byte) (string, int)
- type IPTables
- func (i *IPTables) BaseChain() string
- func (i *IPTables) Flush() error
- func (i *IPTables) GenerateRules(config *types.ClusterConfig) (map[string]*RuleSet, error)
- func (i *IPTables) GenerateRulesForNodeClassic(w *watcher.Watcher, nodeName string, config *types.ClusterConfig, ...) (map[string]*RuleSet, error)
- func (i *IPTables) Merge(subset map[string]*RuleSet, wholeset map[string]*RuleSet) (map[string]*RuleSet, int, error)
- func (i *IPTables) Restore(rules map[string]*RuleSet) error
- func (i *IPTables) Save() (map[string]*RuleSet, error)
- type RuleSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesFromRules ¶
BytesFromRules turns a map of RuleSet pointers into a slic eof bytes
func GetSaveLines ¶
GetSaveLines parses the iptables-save as a string and puts it into a map[string]*kubeRules Modifications were made from the Kube codebase to support iptables save/restore
func NewMetrics ¶
func NewMetrics(lbKind, configKey string) *metrics
NewMetrics creates a new metrics struct tha tholds metrics for iptables
Types ¶
type IPTables ¶
type IPTables struct {
// contains filtered or unexported fields
}
IPTables defines what a manager of IPTables should look like
func NewIPTables ¶
func NewIPTables(ctx context.Context, lbKind, configKey, podCidrMasq, chain string, masq bool, logger log.FieldLogger) (*IPTables, error)
NewIPTables creates a new IPTables struct for managing IPTables
func (*IPTables) GenerateRules ¶
GenerateRules generates a ruleset for only kube-ipvs. a different function ought to merge these XXX chain rule. This os only used by realserver package stuff seemingly.
func (*IPTables) GenerateRulesForNodeClassic ¶
func (i *IPTables) GenerateRulesForNodeClassic(w *watcher.Watcher, nodeName string, config *types.ClusterConfig, useWeightedService bool) (map[string]*RuleSet, error)
GenerateRulesForNodeClassic attempts to restore the original functionality of rule generation prior to versioned Ravel releases