server

package
v2.0.0-beta1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2019 License: MIT Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RouteAppenderFactory

type RouteAppenderFactory interface {
	NewAppender(ctx context.Context, middlewaresBuilder *middleware.Builder, runtimeConfiguration *runtime.Configuration) types.RouteAppender
}

RouteAppenderFactory the route appender factory interface

type Server

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

Server is the reverse-proxy/load-balancer engine

func NewServer

func NewServer(staticConfiguration static.Configuration, provider provider.Provider, entryPoints TCPEntryPoints, tlsManager *tls.Manager) *Server

NewServer returns an initialized Server.

func (*Server) AddListener

func (s *Server) AddListener(listener func(dynamic.Configuration))

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

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 server is shutted down.

type TCPEntryPoint

type TCPEntryPoint struct {
	RouteAppenderFactory RouteAppenderFactory
	// 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

type TCPEntryPoints

type TCPEntryPoints map[string]*TCPEntryPoint

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

Directories

Path Synopsis
tcp
tcp

Jump to

Keyboard shortcuts

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