typserver

package
v0.8.22 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Shutdown added in v0.8.21

func Shutdown(s *Server) error

Shutdown the server

Types

type Controller added in v0.8.21

type Controller interface {
	SetRoute(*echo.Echo)
}

type Server added in v0.8.21

type Server struct {
	*echo.Echo
	// contains filtered or unexported fields
}

Server of rest

func New added in v0.8.15

func New() *Server

New server instance

func (*Server) PutHealthChecker added in v0.8.21

func (s *Server) PutHealthChecker(name string, fn func() error)

PutHealthChecker to put health check function

func (*Server) Register added in v0.8.21

func (s *Server) Register(cntrl Controller)

Register controller

func (*Server) SetLogger added in v0.8.22

func (s *Server) SetLogger(debug bool)

SetLogger to set logger. SetLogger must be called before set route.

func (*Server) Start added in v0.8.21

func (s *Server) Start(addr string) error

Start the server

func (*Server) WithHealthCheckEndpoint added in v0.8.21

func (s *Server) WithHealthCheckEndpoint(endpoint string) *Server

WithHealthCheckEndpoint return Server with new health check endpoint

Jump to

Keyboard shortcuts

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