Documentation ¶ Index ¶ type Config type Handler type ResponseWriter type Server func NewTCPServer(c *Config) Server func NewUDPServer(c *Config) Server Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Config ¶ type Config struct { // listener for tcp server Listener net.Listener // socket for udp server PacketConn net.PacketConn // tcp idle timeout Timeout time.Duration // udp read buffer size MaxUDPPayloadSize int } type Handler ¶ type Handler interface { ServeDNS(ctx context.Context, qCtx *handler.Context, w ResponseWriter) } type ResponseWriter ¶ type ResponseWriter interface { Write(m *dns.Msg) (n int, err error) } type Server ¶ type Server interface { ListenAndServe(h Handler) error } func NewTCPServer ¶ func NewTCPServer(c *Config) Server func NewUDPServer ¶ func NewUDPServer(c *Config) Server Source Files ¶ View all Source files response_writer.go server.go tcp.go udp.go Click to show internal directories. Click to hide internal directories.