server

package
v0.0.0-...-8c61d13 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2020 License: MIT Imports: 9 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 {
	Port int
	Mux  *echo.Echo
	App  *app.App
}

Server is the top-level server instance.

func New

func New(app *app.App) *Server

New initiates a new Server instance and returns it.

func (*Server) Init

func (s *Server) Init(app *app.App)

Init sets up some basic parameters of the provided Server instance.

func (*Server) Run

func (s *Server) Run()

Run spins up the router, adds all routes and listens on the provided port. It panics when the router couldn't be started. Panics in the call chain will recover, print a stack trace and the HTTPErrorHandler handles the panic.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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