server

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

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

T contains all that is necessary to run the HTTP(s) server. Note that it is not thread safe and therefore requires external synchronization.

func New

func New(lsnCfg engine.Listener, router http.Handler, stapler stapler.Stapler,
	connTck conntracker.ConnectionTracker, autoCertCache autocert.Cache, wg *sync.WaitGroup,
	options proxy.Options,
) (*T, error)

New creates a new server instance.

func (*T) Address

func (s *T) Address() engine.Address

func (*T) GetFile

func (s *T) GetFile() (*proxy.FileDescriptor, error)

func (*T) Key

func (s *T) Key() engine.ListenerKey

func (*T) OnHostsUpdated

func (s *T) OnHostsUpdated(hostCfgs map[engine.HostKey]engine.Host)

OnHostsUpdated is supposed to be called whenever a list of hosts is updated, or an OCSP notification for a host is received.

func (*T) Shutdown

func (s *T) Shutdown()

Shutdown gracefuly terminates the server if running.

func (*T) Start

func (s *T) Start(hostCfgs map[engine.HostKey]engine.Host) error

Start starts the server to handle a list of specified hosts.

func (*T) String

func (s *T) String() string

func (*T) TakeFile

func (s *T) TakeFile(fd *proxy.FileDescriptor, hostCfgs map[engine.HostKey]engine.Host) error

func (*T) Update

func (s *T) Update(lsnCfg engine.Listener, hostCfgs map[engine.HostKey]engine.Host) error

Jump to

Keyboard shortcuts

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