derp/derpserver: clean up extraction of derp.Server (#17264)

PR #17258 extracted `derp.Server` into `derp/derpserver.Server`.

This followup patch adds the following cleanups:
1. Rename `derp_server*.go` files to `derpserver*.go` to match
   the package name.
2. Rename the `derpserver.NewServer` constructor to `derpserver.New`
   to reduce stuttering.
3. Remove the unnecessary `derpserver.Conn` type alias.

Updates #17257
Updates #cleanup

Signed-off-by: Simon Law <sfllaw@tailscale.com>
This commit is contained in:
Simon Law
2025-09-24 10:38:30 -07:00
committed by GitHub
parent db02a46645
commit 34242df51b
12 changed files with 23 additions and 25 deletions

View File

@@ -146,7 +146,7 @@ func TestDerpProber(t *testing.T) {
func TestRunDerpProbeNodePair(t *testing.T) {
// os.Setenv("DERP_DEBUG_LOGS", "true")
serverPrivateKey := key.NewNode()
s := derpserver.NewServer(serverPrivateKey, t.Logf)
s := derpserver.New(serverPrivateKey, t.Logf)
defer s.Close()
httpsrv := &http.Server{