Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an IPN backend and its set of 0 or more active localhost TCP or unix socket connections talking to that backend.
func New ¶
New returns a new Server.
To start it, use the Server.Run method.
At some point, either before or after Run, the Server's SetLocalBackend method must also be called before Server can do anything useful.
func (*Server) Run ¶
Run runs the server, accepting connections from ln forever.
If the context is done, the listener is closed. It is also the base context of all HTTP requests.
If the Server's LocalBackend has already been set, Run starts it. Otherwise, the next call to SetLocalBackend will start it.
func (*Server) ServeHTMLStatus ¶
func (s *Server) ServeHTMLStatus(w http.ResponseWriter, r *http.Request)
ServeHTMLStatus serves an HTML status page at http://localhost:41112/ for Windows and via $DEBUG_LISTENER/debug/ipn when tailscaled's --debug flag is used to run a debug server.
func (*Server) SetLocalBackend ¶
func (s *Server) SetLocalBackend(lb *ipnlocal.LocalBackend)
SetLocalBackend sets the server's LocalBackend.
If b.Run has already been called, then lb.Start will be called. Otherwise Start will be called once Run is called.