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:
committed by
mzbenami
parent
c802c3ff05
commit
2820b5e99d
@@ -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)
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user