backend

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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type Backend

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

Provides an abstract zone file for the Namecoin .bit TLD.

func New

func New(cfg *Config) (backend *Backend, err error)

Creates a new Namecoin backend.

func (*Backend) Lookup

func (b *Backend) Lookup(qname, streamIsolationID string) (rrs []dns.RR, err error)

Do low-level queries against an abstract zone file. This is the per-query entrypoint from madns.

type Config

type Config struct {
	NamecoinConn *namecoin.Client

	// Timeout (in milliseconds) for Namecoin RPC requests
	NamecoinTimeout int

	// Maximum entries to permit in name cache.
	CacheMaxEntries int

	// Nameservers to advertise at zone apex. The first is considered the primary.
	// If empty, a pseudo-hostname resolvable to SelfIP is used.
	CanonicalNameservers []string

	// Vanity IPs to place at the zone apex.
	VanityIPs []net.IP

	// Used only if CanonicalNameservers is left blank. An IP which the internal
	// pseudo-hostname should resolve to. This should be the public IP of the
	// nameserver serving the zone expressed by this backend.
	SelfIP string

	// Hostmaster in e. mail form (e.g. "hostmaster@example.com").
	Hostmaster string

	// Map names (like "d/example") to strings containing JSON values. Used to provide
	// fake names for testing purposes. You don't need to use this.
	FakeNames map[string]string
}

Backend configuration.

Jump to

Keyboard shortcuts

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