tshttp

package
v0.0.0-...-f484db6 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Logger     *zap.Logger
	Name       string
	ControlURL string
	StateDir   string
	Debug      bool
	// contains filtered or unexported fields
}

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown is safe to call anytime after Start() has returned.

func (*Server) Start

func (s *Server) Start(handler http.Handler) error

Start brings up the tailnet and starts serving HTTP on port 80. When authentication is needed to continue, a repeating log message will be output. Use Shutdown when ready to stop HTTP and the tailnet.

func (*Server) Tailnet

func (s *Server) Tailnet() *tsnet.Server

Tailnet returns the tsnet.Server which you might want access to before calling Start(handler) -- for example if your http handler uses the tailnet client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL