demo

command
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: MIT Imports: 11 Imported by: 0

README

Demo

This example shows how to use the library to implement a simple pub/sub application.

Running the example

The example requires a working Go development environment.

Server
$ go run main.go

Next command line options are allowed:

Option Default Description
addr localhost:8080 Server host and port
path / Server URL
publish 1s Messages publishing interval
channels general,public,private Publishing channels
WEB
  1. Open index.html in your browser
  2. Click Connect button
  3. Click Subscribe button

Now, every published message which is matched your subscription will be shown in the Messages field.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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