Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseRules ¶
func BaseRules(b RuleSetBuilder)
Adds a set of base rules to the builder. When this is used, priorities [0, 10) and [990, 1000) should be assumed reserved.
TODO: Document these rules a bit.
Types ¶
type Rule ¶
type Rule string
A rule, probably of the iptables variety, although nothing about the value is assumed in this package.
type RuleSetBuilder ¶
Maps a set of priorities to rules at those priorities. Some rules exported here will have "special" priorities that can be depended upon. Rules should be applied from the lowest numbered slice (highest priority) to the highest numbered slice (highest priority).
func NewBuilder ¶
func NewBuilder() RuleSetBuilder
func (RuleSetBuilder) Add ¶
func (b RuleSetBuilder) Add(priority int, rules RuleSet) RuleSetBuilder
func (RuleSetBuilder) Apply ¶
func (b RuleSetBuilder) Apply(mutate func(b RuleSetBuilder)) RuleSetBuilder
func (RuleSetBuilder) Build ¶
func (b RuleSetBuilder) Build() RuleSet
Click to show internal directories.
Click to hide internal directories.