ws

package
v0.0.0-...-87e37c2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatClient

type ChatClient struct{}

type ChatHub

type ChatHub struct {
	Clients    map[*websocket.Conn]ChatClient
	Register   chan *websocket.Conn
	Unregister chan *websocket.Conn
	Broadcast  chan ChatMessage
}

func NewChatHub

func NewChatHub() *ChatHub

func (*ChatHub) Run

func (h *ChatHub) Run()

type ChatMessage

type ChatMessage struct {
	Connection *websocket.Conn
	Body       string
}

type Delivery

type Delivery struct {
	HTTP        *fiber.App
	Middlewares func(int) fiber.Handler
	Service     *service.Service
	Validator   *config.Validator
	Config      *config.Config
}

Delivery struct

func Init

func Init(ioc di.Container) *Delivery

Init func

func (*Delivery) InitChat

func (delivery *Delivery) InitChat() *ChatHub

Jump to

Keyboard shortcuts

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