Documentation ¶
Overview ¶
Package ipset is a library providing a wrapper to the IPtables ipset userspace utility
Index ¶
- func Add(setName, entry string, timeout int) error
- func AddOption(setName, entry string, option string, timeout int) error
- func Del(setName, entry string) error
- func Destroy(setName string) error
- func DestroyAll() error
- func Flush(setName string) error
- func Init() error
- func List(setName string) ([]string, error)
- func New(name string, hashtype string, p *Params) error
- func Refresh(setName string, entries []string) error
- func Swap(from, to string) error
- func Test(setName, entry string) (bool, error)
- type IPSet
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add is used to add the specified entry to the set. A timeout of 0 means that the entry will be stored permanently in the set.
func AddOption ¶
AddOption is used to add the specified entry to the set. A timeout of 0 means that the entry will be stored permanently in the set.
func New ¶
New creates a new set and returns an Interface to it. Example:
testIpset := ipset.New("test", "hash:ip", &ipset.Params{})
Types ¶
Click to show internal directories.
Click to hide internal directories.