Version: v1.8.0 Latest Latest

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

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




This section is empty.


This section is empty.


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.


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"

Source Files

Jump to

Keyboard shortcuts

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