server

package
v0.0.0-...-12a582f Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MPL-2.0 Imports: 8 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 {
	Close chan os.Signal
	Wait  chan bool
	Error chan error
	// contains filtered or unexported fields
}

Server is a structured wrapper for running the API server, encapsulating a route and error handling

func NewServer

func NewServer() Server

NewServer returns a new Server with defaults set, routes bootstrapped, and middleware set up

func (*Server) GracefulShutdown

func (s *Server) GracefulShutdown()

GracefulShutdown safely shuts down the server

func (*Server) Router

func (s *Server) Router() *mux.Router

func (*Server) Start

func (s *Server) Start() chan bool

Start starts the http server

Jump to

Keyboard shortcuts

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