ipset

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEntry

func AddEntry(name string, entry string) error

AddEntry adds a new entry to the set, it will ignore error when the entry already exists.

func CreateIPSet

func CreateIPSet(name string, setType SetType, isIPv6 bool) error

CreateIPSet creates a new set, it will ignore error when the set already exists.

func DelEntry

func DelEntry(name string, entry string) error

DelEntry deletes the entry from the set, it will ignore error when the entry doesn't exist.

func ListEntries

func ListEntries(name string) ([]string, error)

ListEntries lists all the entries of the set.

Types

type SetType

type SetType string
const (
	// The hash:net set type uses a hash to store different sized IP network addresses.
	// The lookup time grows linearly with the number of the different prefix values added to the set.
	HashNet    SetType = "hash:net"
	HashIP     SetType = "hash:ip"
	HashIPPort SetType = "hash:ip,port"
)

Jump to

Keyboard shortcuts

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