Documentation ¶
Index ¶
- type Controller
- func (rm *Controller) Add(rule netlink.Rule) error
- func (rm *Controller) AddWithMetadata(rule netlink.Rule, metadata string) error
- func (rm *Controller) Delete(rule netlink.Rule) error
- func (rm *Controller) DeleteWithMetadata(metadata string) error
- func (rm *Controller) OwnPriority(priority int) error
- func (rm *Controller) Run(stopCh <-chan struct{}, syncPeriod time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(v4, v6 bool) *Controller
NewController creates a new linux IP rule manager
func (*Controller) Add ¶
func (rm *Controller) Add(rule netlink.Rule) error
Add ensures an IP rule is applied even if it is altered by something else, it will be restored
func (*Controller) AddWithMetadata ¶
func (rm *Controller) AddWithMetadata(rule netlink.Rule, metadata string) error
AddWithMetadata ensures an IP rule along with its metadata is applied even if it is altered by something else, it will be restored
func (*Controller) Delete ¶
func (rm *Controller) Delete(rule netlink.Rule) error
Delete stops managed an IP rule and ensures its deleted
func (*Controller) DeleteWithMetadata ¶
func (rm *Controller) DeleteWithMetadata(metadata string) error
Delete stops managing all IP rules with the provided metadata and ensures they are all deleted
func (*Controller) OwnPriority ¶
func (rm *Controller) OwnPriority(priority int) error
OwnPriority ensures any IP rules observed with priority 'priority' must be specified otherwise its removed
func (*Controller) Run ¶
func (rm *Controller) Run(stopCh <-chan struct{}, syncPeriod time.Duration)
Run starts manages linux IP rules
Click to show internal directories.
Click to hide internal directories.