Documentation
¶
Index ¶
- type DefaultEngine
- func (e *DefaultEngine) CreateChain()
- func (e *DefaultEngine) CreateRule()
- func (e *DefaultEngine) CreateTable()
- func (e *DefaultEngine) DeleteChain()
- func (e *DefaultEngine) DeleteRule()
- func (e *DefaultEngine) DeleteTable()
- func (e *DefaultEngine) Start() error
- func (e *DefaultEngine) Stop() error
- func (e *DefaultEngine) UpdateRule()
- type Engine
- type EngineOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultEngine ¶
type DefaultEngine struct { Monitor netlink.NetlinkWatcher Errors <-chan error Lock *sync.Mutex // contains filtered or unexported fields }
func (*DefaultEngine) CreateChain ¶
func (e *DefaultEngine) CreateChain()
func (*DefaultEngine) CreateRule ¶
func (e *DefaultEngine) CreateRule()
func (*DefaultEngine) CreateTable ¶
func (e *DefaultEngine) CreateTable()
func (*DefaultEngine) DeleteChain ¶
func (e *DefaultEngine) DeleteChain()
func (*DefaultEngine) DeleteRule ¶
func (e *DefaultEngine) DeleteRule()
func (*DefaultEngine) DeleteTable ¶
func (e *DefaultEngine) DeleteTable()
func (*DefaultEngine) Start ¶
func (e *DefaultEngine) Start() error
Start starts the execution of the rules engine
func (*DefaultEngine) Stop ¶
func (e *DefaultEngine) Stop() error
Stop stops the execution of the rules engine
func (*DefaultEngine) UpdateRule ¶
func (e *DefaultEngine) UpdateRule()
type EngineOptions ¶
type EngineOptions func(options *engineOptions)
EngineOptions defines a generic function that takes and modifies the listOptions struct
func WithChangeNotify ¶
func WithChangeNotify(notifyChan chan<- struct{}) EngineOptions
WithChangeNotify adds a channel that the engine can send update triggers on. For this to work you must provide a monitor in addition to the trigger as this will only trigger on external changes, not changes that are made via this library.
func WithMonitor ¶
func WithMonitor(monitor netlink.NetlinkWatcher) EngineOptions
WithMonitor adds a Netlink Monitor to the engineOptions. This allows the engine to monitor changes to the nftables configuration in realtime which allows it to update the rule state and send notifications.
Click to show internal directories.
Click to hide internal directories.