Documentation ¶
Index ¶
- type Message
- type PubSub
- func (ps *PubSub) GetMessages(w http.ResponseWriter, r *http.Request, p httprouter.Params)
- func (ps *PubSub) PublishMessage(w http.ResponseWriter, r *http.Request, p httprouter.Params)
- func (ps *PubSub) SetupRoutes(router *httprouter.Router) *httprouter.Router
- func (ps *PubSub) Subscribe(w http.ResponseWriter, r *http.Request, p httprouter.Params)
- func (ps *PubSub) Unsubscribe(w http.ResponseWriter, r *http.Request, p httprouter.Params)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PubSub ¶
func (*PubSub) GetMessages ¶
func (ps *PubSub) GetMessages(w http.ResponseWriter, r *http.Request, p httprouter.Params)
GetMessages returns published messages to the subscriber since subscription. GET /:topic_name/:subscriber_name
func (*PubSub) PublishMessage ¶
func (ps *PubSub) PublishMessage(w http.ResponseWriter, r *http.Request, p httprouter.Params)
PublishMessage send a message to all subscribers POST /:topic_name
func (*PubSub) SetupRoutes ¶
func (ps *PubSub) SetupRoutes(router *httprouter.Router) *httprouter.Router
SetupRoutes maps routes to the PubSub's handlers
func (*PubSub) Subscribe ¶
func (ps *PubSub) Subscribe(w http.ResponseWriter, r *http.Request, p httprouter.Params)
Subscribe adds a subscription to a topic. The subscriber will not receive previously published messages for the topic. POST /:topic_name/:subscriber_name
func (*PubSub) Unsubscribe ¶
func (ps *PubSub) Unsubscribe(w http.ResponseWriter, r *http.Request, p httprouter.Params)
Unsubscribe removes a subscription of a topic. DELETE /:topic_name/:subscriber_name
Click to show internal directories.
Click to hide internal directories.