Documentation
¶
Index ¶
- type PubySuby
- func (ps *PubySuby) LastMessageId(topic string) int64
- func (ps *PubySuby) Pull(topic string, timeout int64) []TopicItem
- func (ps *PubySuby) PullSince(topic string, timeout int64, since int64) []TopicItem
- func (ps *PubySuby) Push(topic string, message string) int64
- func (ps *PubySuby) Sub(topic string) *Subscription
- func (ps *PubySuby) Unsubscribe(subscription *Subscription)
- type Subscription
- type Topic
- type TopicItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PubySuby ¶
type PubySuby struct {
// contains filtered or unexported fields
}
func NewPubySuby ¶
func NewPubySuby() *PubySuby
New creates a new PubySuby hub and starts a goroutine for handling commands
func (*PubySuby) LastMessageId ¶
Retrieves the last message posted to the que
func (*PubySuby) Pull ¶
Pull all messages from the specified topic If none are in the topic, blocks for the timeout duration in milliseconds until new message is published
func (*PubySuby) PullSince ¶
Pull all messages from the specified topic If none are in the topic, blocks for the timeout duration in seconds until new message is published
func (*PubySuby) Sub ¶
func (ps *PubySuby) Sub(topic string) *Subscription
Subscribe to all new messages for a topic
func (*PubySuby) Unsubscribe ¶
func (ps *PubySuby) Unsubscribe(subscription *Subscription)
type Subscription ¶
Click to show internal directories.
Click to hide internal directories.