ipsets

package
v0.0.0-...-2ea7981 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IPFamilyV4 = ipsets.IPFamilyV4
	IPFamilyV6 = ipsets.IPFamilyV6
)
View Source
const (
	IPSetTypeHashIPPort = ipsets.IPSetTypeHashIPPort
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CallBackFunc

type CallBackFunc func(ipSetId string)

type IPFamily

type IPFamily = ipsets.IPFamily

type IPSetMetadata

type IPSetMetadata = ipsets.IPSetMetadata

type IPSetType

type IPSetType = ipsets.IPSetType

type IPSets

type IPSets struct {
	IPVersionConfig *IPVersionConfig
	// contains filtered or unexported fields
}

IPSets manages a whole plane of IP sets, i.e. all the IPv4 sets, or all the IPv6 IP sets.

func NewIPSets

func NewIPSets(ipVersionConfig *IPVersionConfig) *IPSets

func (*IPSets) AddMembers

func (s *IPSets) AddMembers(setID string, newMembers []string)

AddMembers adds a range of new members to an existing IP set in the store

func (*IPSets) AddOrReplaceIPSet

func (s *IPSets) AddOrReplaceIPSet(setMetadata IPSetMetadata, members []string)

AddOrReplaceIPSet is responsible for the creation (or replacement) of an IP set in the store

func (*IPSets) ApplyDeletions

func (m *IPSets) ApplyDeletions() bool

func (*IPSets) ApplyUpdates

func (m *IPSets) ApplyUpdates()

func (*IPSets) GetDesiredMembers

func (m *IPSets) GetDesiredMembers(setID string) (set.Set[string], error)

func (*IPSets) GetIPFamily

func (s *IPSets) GetIPFamily() IPFamily

func (*IPSets) GetIPSetMembers

func (s *IPSets) GetIPSetMembers(setID string) []string

GetIPSetMembers returns all of the members for a given IP set

func (*IPSets) GetTypeOf

func (m *IPSets) GetTypeOf(setID string) (IPSetType, error)

func (*IPSets) QueueResync

func (s *IPSets) QueueResync()

The following functions are no-ops on Windows.

func (*IPSets) RemoveIPSet

func (s *IPSets) RemoveIPSet(setID string)

RemoveIPSet is responsible for the removal of an IP set from the store

func (*IPSets) RemoveMembers

func (s *IPSets) RemoveMembers(setID string, removedMembers []string)

RemoveMembers removes a range of members from an existing IP set in the store

func (*IPSets) SetCallback

func (s *IPSets) SetCallback(callback CallBackFunc)

func (*IPSets) SetFilter

func (s *IPSets) SetFilter(ipSetNames set.Set[string])

type IPVersionConfig

type IPVersionConfig struct {
	Family IPFamily
}

IPVersionConfig wraps up the metadata for a particular IP version.

func NewIPVersionConfig

func NewIPVersionConfig(family IPFamily) *IPVersionConfig

Jump to

Keyboard shortcuts

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