messageServer

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

The messageServer package implements a general purpose messaging platform based on the gorilla websocket implementation. The platform is similar to other messaging platforms like pubnub, in that it is channel based.

This means that you can replace it with the distributed messaging platform of your choice as your app grows.

See the web/assets/js/goradd-ws.js for the client side.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Send added in v0.3.1

func Send(channel string, message interface{})

Send sends a message to the given channel via the current messenger

Types

type MessengerI added in v0.3.1

type MessengerI interface {
	// JavascriptInit returns javascript that needs to be called when a page starts to initialize
	JavascriptInit() string
	// Send sends a message to the given channel
	Send(channel string, message string)
	// JavascriptFiles returns file names and attributes used to embed the need javascript files for your messenger
	JavascriptFiles() map[string]html.Attributes
}
var Messenger MessengerI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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