server

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Health

type Health struct {
	Status string `json:"status"`
}

Health represents the service's health status

type MsgHandler

type MsgHandler struct {
	// contains filtered or unexported fields
}

MsgHandler handle messages received from a service

func NewMsgHandler

func NewMsgHandler(logger logging.Logger, amqp *network.Amqp, thingController *controllers.ThingController) *MsgHandler

NewMsgHandler creates a new MsgHandler instance with the necessary dependencies

func (*MsgHandler) Start

func (mc *MsgHandler) Start(started chan bool)

Start starts to listen messages

func (*MsgHandler) Stop

func (mc *MsgHandler) Stop()

Stop stops to listen for messages

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents the HTTP server

func NewServer

func NewServer(port int, logger logging.Logger, userController *controllers.UserController) Server

NewServer creates a new server instance

func (*Server) Start

func (s *Server) Start(started chan bool)

Start starts the http server

func (*Server) Stop

func (s *Server) Stop()

Stop stops the server

Jump to

Keyboard shortcuts

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