Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn represents a connection to a message broker.
func (*Conn) CreatePublishStream ¶
CreatePublishStream creates publish stream.
type PublishFlag ¶
type PublishFlag byte
PublishFlag is meta information attached to the message to be published.
const ( Buffered PublishFlag = iota + 1 Unbuffered )
Publish flags
type PublishStream ¶
PublishStream is a stream for publish message.
func (*PublishStream) Publish ¶
func (s *PublishStream) Publish(data []byte, flag PublishFlag) error
Publish publishes message.
type SubscribeStream ¶
type SubscribeStream struct {
// contains filtered or unexported fields
}
SubscribeStream is a subscription stream.
func (*SubscribeStream) Done ¶
func (c *SubscribeStream) Done() <-chan struct{}
Done channel for cancellation.
func (*SubscribeStream) Receive ¶
func (c *SubscribeStream) Receive() <-chan []byte
Receive returns received message.
func (*SubscribeStream) Topic ¶
func (c *SubscribeStream) Topic() string
Topic is a subscribed topic.
Click to show internal directories.
Click to hide internal directories.