server

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: MIT Imports: 3 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 {
	sync.RWMutex
	sync.WaitGroup
	log.LogShortcuts

	// Name for logging purposes and management.
	Name string
	// contains filtered or unexported fields
}

Server structure for a web server.

func New

func New(name string) *Server

New server instance creation.

func (*Server) AddWebServer

func (s *Server) AddWebServer(address, port string, secure bool) *web.Web

AddWebServer to the server.

func (*Server) LoadWebServer added in v0.5.0

func (s *Server) LoadWebServer(name string) (*web.Web, error)

LoadWebServer from JSON config file.

func (*Server) SetLogger

func (s *Server) SetLogger(l *log.Logger)

SetLogger changes the logger object and sets the message shortcuts for convenience.

func (*Server) Start

func (s *Server) Start() error

Start all configured sub-servers.

func (*Server) StartWeb added in v0.5.0

func (s *Server) StartWeb()

StartWeb starts all web servers.

func (*Server) Stop

func (s *Server) Stop() error

Stop all sub-servers.

func (*Server) StopWeb added in v0.5.0

func (s *Server) StopWeb() error

StopWeb stops all web servers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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