ipsets

package
v3.6.3+incompatible Latest Latest
Warning

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

Go to latest
Published: May 24, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	IPFamilyV4 = IPFamily("inet")
	IPFamilyV6 = IPFamily("inet6")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IPFamily

type IPFamily string

IPFamily constants to represent the IP family being managed by this IPSet

func (IPFamily) IsValid

func (f IPFamily) IsValid() bool

type IPSetMetadata

type IPSetMetadata struct {
	SetID string
	Type  IPSetType
}

IPSetMetadata contains the metadata for a particular IP set, such as its name and type.

type IPSetType

type IPSetType string

IPSetType constants for the different kinds of IP set.

const (
	IPSetTypeHashIP  IPSetType = "hash:ip"
	IPSetTypeHashNet IPSetType = "hash:net"
)

func (IPSetType) IsValid

func (t IPSetType) IsValid() bool

func (IPSetType) SetType

func (t IPSetType) SetType() string

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

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

GetIPSetMembers returns all of the members for a given IP set

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

type IPSetsDataplane

type IPSetsDataplane interface {
	AddOrReplaceIPSet(setMetadata IPSetMetadata, members []string)
	AddMembers(setID string, newMembers []string)
	RemoveMembers(setID string, removedMembers []string)
	RemoveIPSet(setID string)
}

IPSetsDataplane is interface for managing a plane of ipSet objects.

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