Documentation ¶
Overview ¶
Package ipset contains the functions to interact with ipset.
Index ¶
- type IPSHandler
- func (h *IPSHandler) AddEntry(ip string, set *ipset.IPSet) error
- func (h *IPSHandler) CreateSet(name, comment string) (*ipset.IPSet, error)
- func (h *IPSHandler) DestroySet(name string) error
- func (h *IPSHandler) FlushSet(name string) error
- func (h *IPSHandler) ListEntries(set string) ([]string, error)
- func (h *IPSHandler) ListSets() ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPSHandler ¶
type IPSHandler struct {
// contains filtered or unexported fields
}
IPSHandler is a handler exposing functions to use the ipset utility.
func (*IPSHandler) AddEntry ¶
func (h *IPSHandler) AddEntry(ip string, set *ipset.IPSet) error
AddEntry adds a new entry to the named set.
func (*IPSHandler) CreateSet ¶
func (h *IPSHandler) CreateSet(name, comment string) (*ipset.IPSet, error)
CreateSet creates a new set.
func (*IPSHandler) DestroySet ¶
func (h *IPSHandler) DestroySet(name string) error
DestroySet deletes a named set.
func (*IPSHandler) FlushSet ¶
func (h *IPSHandler) FlushSet(name string) error
FlushSet deletes all entries from a named set.
func (*IPSHandler) ListEntries ¶
func (h *IPSHandler) ListEntries(set string) ([]string, error)
ListEntries lists all the entries from a named set.
func (*IPSHandler) ListSets ¶
func (h *IPSHandler) ListSets() ([]string, error)
ListSets list all set names.
Click to show internal directories.
Click to hide internal directories.