server

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var _, Log = xlog.New("ncdns.server")

Functions

This section is empty.

Types

type Config

type Config struct {
	Bind           string `default:":53" usage:"Address to bind to (e.g. 0.0.0.0:53)"`
	PublicKey      string `default:"" usage:"Path to the DNSKEY KSK public key file"`
	PrivateKey     string `default:"" usage:"Path to the KSK's corresponding private key file"`
	ZonePublicKey  string `` /* 170-byte string literal not displayed */
	ZonePrivateKey string `default:"" usage:"Path to the ZSK's corresponding private key file"`

	NamecoinRPCUsername   string `default:"" usage:"Namecoin RPC username"`
	NamecoinRPCPassword   string `default:"" usage:"Namecoin RPC password"`
	NamecoinRPCAddress    string `default:"127.0.0.1:8336" usage:"Namecoin RPC server address"`
	NamecoinRPCCookiePath string `default:"" usage:"Namecoin RPC cookie path (used if password is unspecified)"`
	NamecoinRPCTimeout    int    `default:"1500" usage:"Timeout (in milliseconds) for Namecoin RPC requests"`
	CacheMaxEntries       int    `default:"100" usage:"Maximum name cache entries"`
	SelfName              string `default:"" usage:"The FQDN of this nameserver. If empty, a pseudo-hostname is generated."`
	SelfIP                string `default:"127.127.127.127" usage:"The canonical IP address for this service"`

	HTTPListenAddr string `default:"" usage:"Address for webserver to listen at (default: disabled)"`

	CanonicalSuffix      string `default:"bit" usage:"Suffix to advertise via HTTP"`
	CanonicalNameservers string `` /* 140-byte string literal not displayed */

	Hostmaster string `default:"" usage:"Hostmaster e. mail address"`
	VanityIPs  string `` /* 132-byte string literal not displayed */

	TplSet  string `default:"std" usage:"The template set to use"`
	TplPath string `default:"" usage:"The path to the tpl directory (empty: autodetect)"`

	ConfigDir string // path to interpret filenames relative to
	// contains filtered or unexported fields
}

type Server

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

func New

func New(cfg *Config) (s *Server, err error)

func (*Server) ServerName

func (s *Server) ServerName() string

func (*Server) Start

func (s *Server) Start() error

func (*Server) StartBackgroundTasks

func (s *Server) StartBackgroundTasks() error

func (*Server) Stop

func (s *Server) Stop() error

Jump to

Keyboard shortcuts

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