Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(dnscoretest): embed io.Writer in ResponseWriter #11

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dnscoretest/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package dnscoretest

import (
"io"
"net"

"github.com/miekg/dns"
Expand All @@ -11,7 +12,7 @@ import (

// ResponseWriter allows writing raw DNS responses.
type ResponseWriter interface {
Write(rawMsg []byte) (int, error)
io.Writer
}

// Handler is a function that handles a DNS query.
Expand Down
4 changes: 4 additions & 0 deletions serveraddr.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ const (

// ServerAddr is a DNS server address.
//
// While currently minimal, ServerAddr is designed as a pointer type to
// allow for future extensions of server-specific properties (e.g., custom
// headers for DoH) without requiring breaking API changes.
//
// Construct using [NewServerAddr].
type ServerAddr struct {
// Protocol is the transport protocol to use.
Expand Down