iprulemanager

package
v0.0.0-...-12c5f08 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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) Delete

func (rm *Controller) Delete(rule netlink.Rule) error

Delete stops managed an IP rule and ensures its 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL