ipset

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMask4 = 32
	DefaultMask6 = 128
	DefaultTTL4  = 10 * time.Minute
	DefaultTTL6  = 10 * time.Minute
)
View Source
const Type = "ipset"

Variables

This section is empty.

Functions

func NewIPSet

func NewIPSet(_ context.Context, _ adapter.Core, logger log.Logger, tag string, args any) (adapter.PluginExecutor, error)

Types

type Args

type Args struct {
	Name4    string         `json:"name4"`
	Name6    string         `json:"name6"`
	Create4  bool           `json:"create4"`
	Create6  bool           `json:"create6"`
	Destroy4 bool           `json:"destroy4"`
	Destroy6 bool           `json:"destroy6"`
	Mask4    uint8          `json:"mask4"`
	Mask6    uint8          `json:"mask6"`
	TTL4     utils.Duration `json:"ttl4"`
	TTL6     utils.Duration `json:"ttl6"`
}

type IPSet

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

func (*IPSet) APIHandler

func (i *IPSet) APIHandler() chi.Router

func (*IPSet) Close

func (i *IPSet) Close() error

func (*IPSet) Exec

func (i *IPSet) Exec(ctx context.Context, dnsCtx *adapter.DNSContext, argsID uint16) (adapter.ReturnMode, error)

func (*IPSet) LoadRunningArgs

func (i *IPSet) LoadRunningArgs(_ context.Context, args any) (uint16, error)

func (*IPSet) Start

func (i *IPSet) Start() error

func (*IPSet) Tag

func (i *IPSet) Tag() string

func (*IPSet) Type

func (i *IPSet) Type() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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