app

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

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientMessageType

type ClientMessageType string
const (
	RESPONSE  ClientMessageType = "Response"
	SUBSCRIBE ClientMessageType = "Subscribe"
	PRODUCE   ClientMessageType = "Produce"
)

type HttpServer

type HttpServer struct {
	Broker *broker.Broker
	Router *mux.Router
	Logger *zap.Logger
}

func NewHttpServer

func NewHttpServer(b *broker.Broker, logger *zap.Logger) *HttpServer

func (*HttpServer) StartHttpServer

func (h *HttpServer) StartHttpServer(port string)

type TCPMessage

type TCPMessage struct {
	Type       ClientMessageType `json:"type"`
	Payload    json.RawMessage   `json:"payload"`
	Queue      string            `json:"queue"`
	Enviorment string            `json:"enviorment"`
	Sender     string            `json:"sender"`
	Connection *net.Conn
}

type TCPServer

type TCPServer struct {
	Logger *zap.Logger

	MsgChannel chan TCPMessage
	// contains filtered or unexported fields
}

func NewTCPServer

func NewTCPServer(listenAddress string, logger *zap.Logger) *TCPServer

func (*TCPServer) Start

func (s *TCPServer) Start() error

Jump to

Keyboard shortcuts

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