feature/conn25: rename localapi.go to api.go

And rename serveStateGet to serveLocalAPIStateGet to prepare for adding
a c2n handler that is backed by the same methods as the LocalAPI
handler.

Updates tailscale/corp#40125

Signed-off-by: Michael Ben-Ami <mzb@tailscale.com>
This commit is contained in:
Michael Ben-Ami
2026-07-22 13:04:41 -04:00
committed by mzbenami
parent c802c3ff05
commit 2820b5e99d
3 changed files with 3 additions and 3 deletions
@@ -22,9 +22,9 @@ import (
"tailscale.com/util/testenv"
)
// serveStateGet serves the localapi endpoint /conn25-state.
// serveLocalAPIStateGet serves the localapi endpoint /conn25-state.
// See also [*Conn25.GetActiveState].
func serveStateGet(h *localapi.Handler, w http.ResponseWriter, r *http.Request) {
func serveLocalAPIStateGet(h *localapi.Handler, w http.ResponseWriter, r *http.Request) {
// TODO(tailscale/corp#39033): Remove for alpha release.
if !envknob.UseWIPCode() && !testenv.InTest() {
w.WriteHeader(http.StatusNotImplemented)
+1 -1
View File
@@ -85,7 +85,7 @@ func init() {
})
ipnlocal.RegisterPeerAPIHandler("/v0/connector/transit-ip", handleConnectorTransitIP)
ipnlocal.HookReplyToDNSQueries.Add(handleHookReplyToDNSQueries)
localapi.Register("conn25-state", serveStateGet)
localapi.Register("conn25-state", serveLocalAPIStateGet)
}
func handleConnectorTransitIP(h ipnlocal.PeerAPIHandler, w http.ResponseWriter, r *http.Request) {