server

package
v2.0.0-...-63d56cd Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2019 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigurationWatcher

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

ConfigurationWatcher watches configuration changes.

func NewConfigurationWatcher

func NewConfigurationWatcher(routinesPool *safe.Pool, pvd provider.Provider, providersThrottleDuration time.Duration) *ConfigurationWatcher

NewConfigurationWatcher creates a new ConfigurationWatcher.

func (*ConfigurationWatcher) AddListener

func (c *ConfigurationWatcher) AddListener(listener func(dynamic.Configuration))

AddListener adds a new listener function used when new configuration is provided

func (*ConfigurationWatcher) Start

func (c *ConfigurationWatcher) Start()

Start the configuration watcher.

func (*ConfigurationWatcher) Stop

func (c *ConfigurationWatcher) Stop()

Stop the configuration watcher.

type Server

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

Server is the reverse-proxy/load-balancer engine

func NewServer

func NewServer(routinesPool *safe.Pool, entryPoints TCPEntryPoints, watcher *ConfigurationWatcher,
	chainBuilder *middleware.ChainBuilder, accessLoggerMiddleware *accesslog.Handler) *Server

NewServer returns an initialized Server.

func (*Server) Close

func (s *Server) Close()

Close destroys the server

func (*Server) Start

func (s *Server) Start(ctx context.Context)

Start starts the server and Stop/Close it when context is Done

func (*Server) Stop

func (s *Server) Stop()

Stop stops the server

func (*Server) Wait

func (s *Server) Wait()

Wait blocks until the server shutdown.

type TCPEntryPoint

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

TCPEntryPoint is the TCP server

func NewTCPEntryPoint

func NewTCPEntryPoint(ctx context.Context, configuration *static.EntryPoint) (*TCPEntryPoint, error)

NewTCPEntryPoint creates a new TCPEntryPoint

func (*TCPEntryPoint) Shutdown

func (e *TCPEntryPoint) Shutdown(ctx context.Context)

Shutdown stops the TCP connections

func (*TCPEntryPoint) StartTCP

func (e *TCPEntryPoint) StartTCP(ctx context.Context)

StartTCP starts the TCP server.

func (*TCPEntryPoint) SwitchRouter

func (e *TCPEntryPoint) SwitchRouter(rt *tcp.Router)

SwitchRouter switches the TCP router handler.

type TCPEntryPoints

type TCPEntryPoints map[string]*TCPEntryPoint

TCPEntryPoints holds a map of TCPEntryPoint (the entrypoint names being the keys)

func NewTCPEntryPoints

func NewTCPEntryPoints(staticConfiguration static.Configuration) (TCPEntryPoints, error)

NewTCPEntryPoints creates a new TCPEntryPoints.

func (TCPEntryPoints) Start

func (eps TCPEntryPoints) Start()

Start the server entry points.

func (TCPEntryPoints) Stop

func (eps TCPEntryPoints) Stop()

Stop the server entry points.

func (TCPEntryPoints) Switch

func (eps TCPEntryPoints) Switch(routersTCP map[string]*tcp.Router)

Switch the TCP routers.

type TCPRouterFactory

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

TCPRouterFactory the factory of TCP routers.

func NewTCPRouterFactory

func NewTCPRouterFactory(staticConfiguration static.Configuration, managerFactory *service.ManagerFactory, tlsManager *tls.Manager, chainBuilder *middleware.ChainBuilder) *TCPRouterFactory

NewTCPRouterFactory creates a new TCPRouterFactory

func (*TCPRouterFactory) CreateTCPRouters

func (f *TCPRouterFactory) CreateTCPRouters(conf dynamic.Configuration) map[string]*tcpCore.Router

CreateTCPRouters creates new TCPRouters

Directories

Path Synopsis
tcp
tcp

Jump to

Keyboard shortcuts

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