Documentation
¶
Index ¶
- Constants
- func NewIPSet(_ context.Context, _ adapter.Core, logger log.Logger, tag string, args any) (adapter.PluginExecutor, error)
- type Args
- type IPSet
- func (i *IPSet) APIHandler() chi.Router
- func (i *IPSet) Close() error
- func (i *IPSet) Exec(ctx context.Context, dnsCtx *adapter.DNSContext, argsID uint16) (adapter.ReturnMode, error)
- func (i *IPSet) LoadRunningArgs(_ context.Context, args any) (uint16, error)
- func (i *IPSet) Start() error
- func (i *IPSet) Tag() string
- func (i *IPSet) Type() string
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 ¶
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) Exec ¶
func (i *IPSet) Exec(ctx context.Context, dnsCtx *adapter.DNSContext, argsID uint16) (adapter.ReturnMode, error)
func (*IPSet) LoadRunningArgs ¶
Click to show internal directories.
Click to hide internal directories.