package
Version:
v1.7.3
Opens a new window with list of versions in this module.
Published: Jul 5, 2019
License: Apache-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 15
Opens a new window with list of known importers.
Documentation
¶
Hub is the struct that hold the subscription and do the broadcast logic
NewHub is factory for Hub
type Parcel struct {
Channel string
Data []byte
Connection *connection
}
Parcel is the protocol that Hub talk with
WsPubSub is a websocket trsnaport of pubsub
Protocol: {"action": "sub", "channel": "royuen"}
{"action": "pub", "channel": "royuen", "data": {"any":"thing"}}
NewWsPubsub is factory for WsPubSub
func (*WsPubSub) Handle ¶
Handle will hijack the http responseWriter and req.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.