ipvsadm

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: BSD-2-Clause-Views Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateRules

func UpdateRules(logger zerolog.Logger, netns string, loadedRuleSet RuleSet, newRuleSet RuleSet, updates IPVSUpdates) error

Types

type IPVSUpdates

type IPVSUpdates struct {
	// contains filtered or unexported fields
}

func FindRuleUpdates

func FindRuleUpdates(loadedRuleSet RuleSet, newRuleSet RuleSet) IPVSUpdates

type RealServer

type RealServer struct {
	// contains filtered or unexported fields
}

func NewRealServer

func NewRealServer(protocol string, serviceIP netip.Addr, servicePort uint16, serverIP netip.Addr, serverPort uint16, weigth int, forwardingMethod string) (RealServer, error)

func (RealServer) String

func (rs RealServer) String() string

Will output the equivalent ipvsadm command to add the real-server

type RuleSet

type RuleSet struct {
	// contains filtered or unexported fields
}

func GetLoadedRules

func GetLoadedRules(logger zerolog.Logger, netns string) (RuleSet, error)

func NewRuleset

func NewRuleset() RuleSet

func (*RuleSet) AddRS

func (rset *RuleSet) AddRS(rs RealServer) error

func (*RuleSet) AddVS

func (rset *RuleSet) AddVS(vs VirtualService) error

func (RuleSet) GenerateRules

func (rset RuleSet) GenerateRules() string

type VirtualService

type VirtualService struct {
	// contains filtered or unexported fields
}

func NewVirtualService

func NewVirtualService(protocol string, serviceIP netip.Addr, port uint16, schedulingMethod string) (VirtualService, error)

func (VirtualService) String

func (vs VirtualService) String() string

Will output the equivalent ipvsadm command to add the virtual service

Jump to

Keyboard shortcuts

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