chat

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeWs

func ServeWs(h *Hub, conn *websocket.Conn, room string)

ServeWs handles websocket requests from the peer.

Types

type Hub

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

Hub maintains the set of active connections and broadcasts messages to the connections.

func NewHub

func NewHub(bus event.Bus, logger log.Logger, chatbotSvc pb.ChatbotSvcClient, messageSvc pb.MessageSvcClient) *Hub

func (*Hub) EventHandle

func (h *Hub) EventHandle()

func (*Hub) Run

func (h *Hub) Run()

Jump to

Keyboard shortcuts

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