ipset

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSetExists = errors.New("set exists")
View Source
var ErrSetNotFound = errors.New("set not found")

Functions

This section is empty.

Types

type CreateOption

type CreateOption func(i Info) Info

func CreateOptionFamily

func CreateOptionFamily(family string) CreateOption

func CreateOptionTimeout

func CreateOptionTimeout(timeout int) CreateOption

type Entry added in v0.4.0

type Entry struct {
	Addr    net.IP
	Timeout *int
}

type IPSet

type IPSet struct {
	// contains filtered or unexported fields
}

func New

func New() *IPSet

func (*IPSet) Add

func (set *IPSet) Add(name string, addr net.IP) (bool, error)

func (*IPSet) Add6

func (set *IPSet) Add6(name string, addr net.IP) (bool, error)

func (*IPSet) Close

func (set *IPSet) Close()

func (*IPSet) Command

func (set *IPSet) Command(command string) (int, string, error)

func (*IPSet) Create

func (set *IPSet) Create(name string, options ...CreateOption) error

func (*IPSet) Destroy

func (set *IPSet) Destroy(name string) error

func (*IPSet) Info

func (set *IPSet) Info(name string) (Info, error)

func (*IPSet) Test

func (set *IPSet) Test(name string, addr net.IP) (bool, error)

func (*IPSet) Test6

func (set *IPSet) Test6(name string, addr net.IP) (bool, error)

type Info

type Info struct {
	Name    string
	Type    string
	Family  string
	Timeout *int
	Entries []Entry
}

func (Info) String

func (set Info) String() string

Directories

Path Synopsis
cmd
testipset command

Jump to

Keyboard shortcuts

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