Movatterモバイル変換


[0]ホーム

URL:


ipnserver

package
v1.92.2Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2025 License:BSD-3-ClauseImports:36Imported by:17

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package ipnserver runs the LocalAPI HTTP server that communicateswith the LocalBackend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcNewContextWithActorForTestadded inv1.84.0

func NewContextWithActorForTest(ctxcontext.Context, actoripnauth.Actor)context.Context

NewContextWithActorForTest returns a new context that carries the identityof the specified actor. It is used in tests only.

Types

typeServeradded inv1.18.0

type Server struct {// contains filtered or unexported fields}

Server is an IPN backend and its set of 0 or more active localhostTCP or unix socket connections talking to that backend.

funcNewadded inv1.18.0

func New(logflogger.Logf, logIDlogid.PublicID, bus *eventbus.Bus, netMon *netmon.Monitor) *Server

New returns a new Server.

To start it, use the Server.Run method.

At some point, either before or after Run, the Server's SetLocalBackendmethod must also be called before Server can do anything useful.

func (*Server)BlockWhileInUseByOtherForTestadded inv1.84.0

func (s *Server) BlockWhileInUseByOtherForTest(ctxcontext.Context, actoripnauth.Actor)error

BlockWhileInUseByOtherForTest blocks while the actor can't connect to the server becausethe server is in use by a different actor. It is used in tests only.

func (*Server)BlockWhileInUseForTestadded inv1.84.0

func (s *Server) BlockWhileInUseForTest(ctxcontext.Context)error

BlockWhileInUseForTest blocks until the server becomes idle (no active requests),or the specified context is done. It returns the context's error if it is done.It is used in tests only.

func (*Server)Runadded inv1.18.0

func (s *Server) Run(ctxcontext.Context, lnnet.Listener)error

Run runs the server, accepting connections from ln forever.

If the context is done, the listener is closed. It is also the base contextof 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)ServeHTMLStatusadded inv1.18.0

func (s *Server) ServeHTMLStatus(whttp.ResponseWriter, r *http.Request)

ServeHTMLStatus serves an HTML status page athttp://localhost:41112/ forWindows and via $DEBUG_LISTENER/debug/ipn when tailscaled's --debug flagis used to run a debug server.

func (*Server)ServeHTTPForTestadded inv1.84.0

func (s *Server) ServeHTTPForTest(whttp.ResponseWriter, r *http.Request)

ServeHTTPForTest responds to a single LocalAPI HTTP request.The request's context carries the actor that made the requestand can be created withNewContextWithActorForTest.It is used in tests only.

func (*Server)SetLocalBackendadded inv1.34.0

func (s *Server) SetLocalBackend(lb *ipnlocal.LocalBackend)

SetLocalBackend sets the server's LocalBackend.

It should only call be called after calling lb.Start.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp