server

package
v0.0.0-...-af59c4b Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 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 {
	Server *http.Server
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

NewServer creates a new Server

func (*Server) Init

func (server *Server) Init() error

Init initlize the server with the given configuration

func (*Server) Serve

func (server *Server) Serve()

Serve start the serving of the server

func (*Server) Shutdown

func (server *Server) Shutdown() error

Destroy and shutdown the started server

func (*Server) UseMiddleware

func (server *Server) UseMiddleware(m middleware.Middleware)

UseMiddleware registered a middelware wrapper function for all registered server routes

func (*Server) UseRouter

func (server *Server) UseRouter(routers ...router.Router)

UseRouter registered given routers to the server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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