service

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blocked

type Blocked struct {
	IPv4 string `json:"ipv4"`
	IPv6 string `json:"ipv6"`
	PTR  string `json:"ptr"`
}

type Config

type Config struct {
	ApiListen       string   `json:"api"`
	ListenAddresses []string `json:"listen"`
	Blocked         Blocked  `json:"blocked"`
	TTL             uint32   `json:"ttl"`
	Forwarders      []string `json:"forwarders"`
	Database        Database `json:"database"`
}

func LoadConfig

func LoadConfig(p string) (cfg Config, err error)

type Database

type Database struct {
	FileSystem *struct {
		Path string `json:"path"`
	} `json:"fs,omitempty"`
}

type Service

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

func New

func New(dnsListenAddresses []string, blocked Blocked, ttl uint32, forwarders []string, db iface.Database, httpApiListen string, errch chan error) (s *Service, err error)

func (*Service) Listen

func (s *Service) Listen() error

type StartupFailureError

type StartupFailureError error

Jump to

Keyboard shortcuts

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