server

package
v0.0.0-...-fa16b3f Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ListenAddr string `yaml:"listenaddr"`
	ListenPort int    `yaml:"listenport"`
	// Resolvers are a list of IPs to send DNS queries to
	Resolvers []string `yaml:"resolvers"`
	Debug     bool     `yaml:"debug"`
}

Config is the Server Config

func LoadConfig

func LoadConfig(buf []byte) (Config, error)

LoadConfig loads a config from a byte buffer

type Server

type Server interface {
	ListenAndServe() error
}

Server is the server interface

func NewServer

func NewServer(cfg Config) (Server, error)

NewServer does what it says

Jump to

Keyboard shortcuts

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