Documentation
¶
Overview ¶
Package nsd configures and runs an NSD nameserver that implements gitlab.com/internetstiftelsen-oss/dnse/nameserver.Nameserver.
Index ¶
- func IsHexString(s string) bool
- type AddrPort
- type Allow
- type Bool
- type Config
- type NSD
- func (n *NSD) CheckHealth(ctx context.Context) []health.Check
- func (n *NSD) Close() (err error)
- func (n *NSD) Configure(ctx context.Context, config *nameserver.Config) (err error)
- func (n *NSD) ReloadZone(ctx context.Context, zone dnse.Name) error
- func (n *NSD) Run(ctx context.Context, notifyStarted func()) error
- type QuotedString
- type Remote
- type RemoteControl
- type Server
- type Verify
- type Zone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsHexString ¶
IsHexString tests wether or not a string consists of only hexadecimal digits or not.
Types ¶
type AddrPort ¶
AddrPort wraps netip.AddrPort to fit NSD syntax.
type Config ¶
type Config struct {
RemoteControl *RemoteControl
Server *Server
TSIGKeys []*tsig.Key
Verify *Verify
Zones dnse.NameMap[Zone]
}
Config contains an entire NSD configuration.
The format of NSD’s configuration is, as with most things NSD, not fully documented. The documentation covers some of it, the sample file gives some more clues.
type NSD ¶
type NSD struct {
// contains filtered or unexported fields
}
NSD is an instance of an NSD name server.
func (*NSD) CheckHealth ¶
CheckHealth implements github.com/dotse/go-health.Checker.
func (*NSD) ReloadZone ¶
ReloadZone reloads a zone.
type QuotedString ¶
type QuotedString string
QuotedString wraps a string to stringify to a quoted string.
func (QuotedString) String ¶
func (q QuotedString) String() string
type Remote ¶
Remote is a remote name server with an address, a port and an optional TSIG key (name).
type RemoteControl ¶
type RemoteControl struct {
ControlCertFile QuotedString
ControlKeyFile QuotedString
Interface QuotedString
ServerCertFile QuotedString
ServerKeyFile QuotedString
}
RemoteControl configures NSD’s IPC.
type Server ¶
type Server struct {
Count uint64
Database QuotedString
Debug Bool
DoIP6 Bool
IPAddress []AddrPort
Identity QuotedString
NSID QuotedString
PIDFile QuotedString
Verbosity int
XFRDFile QuotedString
XFRDir QuotedString
ZoneListFile QuotedString
ZonefilesWrite nameserver.Duration
ZonesDir QuotedString
}
Server holds NSD’s server configuration.
type Verify ¶
type Verify struct {
Count uint64
FeedZone Bool
IPAddress []AddrPort
Port uint16
Timeout nameserver.Duration
Verifier string
VerifyZones Bool
}
Verify holds NSD’s verify configuration.
type Zone ¶
type Zone struct {
AllowNotify []Allow
AllowQuery []Allow
CreateIXFR Bool
IXFRNumber uint64
IXFRSize uint64
MaxRefreshTime nameserver.Duration
MaxRetryTime nameserver.Duration
MinExpireTime nameserver.Duration
MinRefreshTime nameserver.Duration
MinRetryTime nameserver.Duration
Notify []Remote
NotifyRetry uint64
ProvideXFR []Allow
RequestXFR []Remote
StoreIXFR Bool
Zonefile QuotedString
}
Zone holds NSD’s zone configuration.