Versions in this module Expand all Collapse all v0 v0.1.0 Jul 12, 2026 Changes in this version + var ErrNotInitialized = errors.New("netset: ipset client is not initialized") + var ErrUnsupported = netlink.ErrUnsupported + func Add(setName, entry string, opts ...Option) error + func Create(setName string, opts ...Option) error + func Del(setName, entry string) error + func Destroy(setName string) error + func Flush(setName string) error + func Init() error + type Family uint8 + const FamilyARP + const FamilyBridge + const FamilyINet + const FamilyIPv4 + const FamilyIPv6 + const FamilyNetdev + const FamilyUnspec + type IPSet struct + func NewIPSet() (*IPSet, error) + func (s *IPSet) Add(setName, entry string, opts ...Option) error + func (s *IPSet) AddAddr(setName string, ip netip.Addr, opts ...Option) error + func (s *IPSet) AddPrefix(setName string, prefix netip.Prefix, opts ...Option) error + func (s *IPSet) Close() error + func (s *IPSet) Create(setName string, opts ...Option) error + func (s *IPSet) Del(setName, entry string) error + func (s *IPSet) DelAddr(setName string, ip netip.Addr) error + func (s *IPSet) DelPrefix(setName string, prefix netip.Prefix) error + func (s *IPSet) Destroy(setName string) error + func (s *IPSet) Flush(setName string) error + type NFTSet struct + func NewNFTSet(table, setName string, opts ...Option) (*NFTSet, error) + func (s *NFTSet) Add(entry string, opts ...Option) error + func (s *NFTSet) AddAddr(ip netip.Addr, opts ...Option) error + func (s *NFTSet) AddPrefix(prefix netip.Prefix, opts ...Option) error + func (s *NFTSet) Close() error + func (s *NFTSet) Create(opts ...Option) error + func (s *NFTSet) Del(entry string) error + func (s *NFTSet) DelAddr(ip netip.Addr) error + func (s *NFTSet) DelPrefix(prefix netip.Prefix) error + func (s *NFTSet) Destroy() error + func (s *NFTSet) Flush() error + type Option func(*Options) + func OptExcl() Option + func OptFamily(f Family) Option + func OptIPv6() Option + func OptInterval() Option + func OptTimeout(timeout uint32) Option + type Options struct + Excl bool + Family Family + IPv6 bool + Interval bool + Timeout uint32