Documentation ¶
Index ¶
- Constants
- Variables
- func BeginRule() (ret ruleBuilder)
- func IfBaseRulesFromConfig(ctx context.Context, cons func(BaseRules) error) error
- func LastAppliedRulesUpd(netNS string, data *AppliedRules)
- func MakeBatchBackoff() backoff.Backoff
- func PatchAppliedRules(ctx context.Context, rules *AppliedRules, p Patch) (err error)
- func WithBaseRules(baseRules BaseRules) funcBatchOpt
- func WithLogger(l logger.TypeOfLogger) funcBatchOpt
- type AppliedRules
- type BaseRules
- type BatchOpt
- type BatchPerformer
- type IPAdresses
- type IPAdressesMapKey
- type IpAddr
- type IpDev
- type IpDevs
- type LinkID
- type LinkRefs
- type NFTablesConf
- type NetConf
- type NfChain
- type NfChainKey
- type NfSet
- type NfTableKey
- type NfTablesProcessor
- type NfTablesProcessorOpt
- type Patch
- type SGClient
- type Tx
- type TxProvider
- type UpdStrategy
- type UpdateFqdnNetsets
- type WithNetNS
Constants ¶
View Source
const (
// MainTablePrefix -
MainTablePrefix = "main"
)
Variables ¶
View Source
var ( // ErrNfTablesProcessor points to error came from 'NfTablesProcessor' ErrNfTablesProcessor = errors.New("NfTablesProcessor error") // ErrPatchNotApplicable ErrPatchNotApplicable = errors.New("patch is not applicable") )
View Source
var NewTx = nftrc.NewTx
NewTx creates transaction conn to netfilter
Functions ¶
func IfBaseRulesFromConfig ¶
IfBaseRulesFromConfig -
func LastAppliedRulesUpd ¶
func LastAppliedRulesUpd(netNS string, data *AppliedRules)
LastAppliedRulesUpd -
func PatchAppliedRules ¶
func PatchAppliedRules(ctx context.Context, rules *AppliedRules, p Patch) (err error)
PatchAppliedRules -
Types ¶
type AppliedRules ¶
type AppliedRules struct { ID uuid.UUID NetNS string TargetTable string BaseRules BaseRules LocalData resources.LocalData }
AppliedRules -
type BatchPerformer ¶
type BatchPerformer struct { TableName string Tx TxProvider }
BatchPerformer -
type NFTablesConf ¶
type NFTablesConf = nftrc.StateOfNFTables
NFTablesConf is a type alias
func NFTconfLoad ¶
func NFTconfLoad(conn *nftlib.Conn) (NFTablesConf, error)
NFTconfLoad it loads current nftables config
type NfTablesProcessor ¶
type NfTablesProcessor interface { ApplyConf(ctx context.Context, data resources.LocalData) (AppliedRules, error) Close() error }
NfTablesProcessor abstract interface
func NewNfTablesProcessor ¶
func NewNfTablesProcessor(client SGClient, opts ...NfTablesProcessorOpt) NfTablesProcessor
NewNfTablesProcessor creates NfTablesProcessor from SGClient
type NfTablesProcessorOpt ¶
type NfTablesProcessorOpt interface {
// contains filtered or unexported methods
}
NfTablesProcessorOpt constructor option(s)
type Patch ¶
type Patch interface { String() string Apply(context.Context, *AppliedRules) error // contains filtered or unexported methods }
Patch -
type UpdateFqdnNetsets ¶
UpdateFqdnNetsets - is kind of Patch
func (UpdateFqdnNetsets) Apply ¶
func (ns UpdateFqdnNetsets) Apply(ctx context.Context, rules *AppliedRules) error
Apply -
func (UpdateFqdnNetsets) String ¶
func (p UpdateFqdnNetsets) String() string
String impl Stringer interface
Source Files ¶
Click to show internal directories.
Click to hide internal directories.