typserver

package
v0.8.25 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: MIT Imports: 8 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 NewServer added in v0.8.25

func NewServer() *Server

NewServer return new instance of 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

type ServerModule added in v0.8.25

type ServerModule struct{}

ServerModule handle dependency for server

func Module

func Module() *ServerModule

Module return new instance of ServerModule

func (*ServerModule) Destroy added in v0.8.25

func (*ServerModule) Destroy() []*typapp.Destruction

Destroy dependency

func (*ServerModule) Provide added in v0.8.25

func (*ServerModule) Provide() []*typapp.Constructor

Provide dependency

Jump to

Keyboard shortcuts

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