server

package
v0.0.0-...-6f75e30 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InHandlerUnexpectedIncomingMessageTypeError = inHandlerEB(errors.New("unexpected incoming message type"))
	InHandlerUnmarshallRequestError             = inHandlerEB(UnmarshallRequestError)
	InHandlerMarshallResponseError              = inHandlerEB(MarshallResponseError)
	InHandlerSendResponseError                  = inHandlerEB(errors.New("send response error"))
	InHandlerWsUpgradeError                     = inHandlerEB(errors.New("ws upgrade error"))
)
View Source
var (
	UnmarshallRequestError = errors.New("unmarshall request error")
	MarshallResponseError  = errors.New("marshall response error")
)

Functions

This section is empty.

Types

type InHandler

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

InHandler - handle incoming logging streams

func NewInHandler

func NewInHandler(queue queue[live_debugger.LogDTO], upg upgrader) *InHandler

NewInHandler - InHandler constructor

func (InHandler) ServeHTTP

func (h InHandler) ServeHTTP(w responseWriter, r *http.Request)

ServeHTTP - http.Handler interface implementation

type OutHandler

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

OutHandler - handle outgoing logging streams

func NewOutHandler

func NewOutHandler(
	queue queue[live_debugger.LogDTO],
	upg upgrader,
	server configuration.Server,
) *OutHandler

NewOutHandler - OutHandler constructor

func (OutHandler) ServeHTTP

func (h OutHandler) ServeHTTP(w responseWriter, r *http.Request)

ServeHTTP - http.Handler interface implementation

type Server

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

Server - WebSocket server having two location

func NewServer

func NewServer(configuration configuration.Server, inHandler httpHandler, outHandler httpHandler) *Server

NewServer - Server instance constructor

func (*Server) Run

func (s *Server) Run()

Run - configure server and start listening http connections

func (*Server) Stop

func (s *Server) Stop(ctx context.Context)

Stop - stop server listening http connection

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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