Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PubSubMessage ¶
type PubSubMessage struct {
// contains filtered or unexported fields
}
func NewPubSubMessage ¶
func NewPubSubMessage(topic, message string) PubSubMessage
func UnmarshalPubSubMessage ¶
func UnmarshalPubSubMessage(data []byte) PubSubMessage
func (PubSubMessage) Marshal ¶
func (m PubSubMessage) Marshal() []byte
func (PubSubMessage) Message ¶
func (m PubSubMessage) Message() string
func (PubSubMessage) String ¶
func (m PubSubMessage) String() string
func (PubSubMessage) Topic ¶
func (m PubSubMessage) Topic() string
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func NewPublisher ¶
func (*Publisher) Publish ¶
func (p *Publisher) Publish(message PubSubMessage) error
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
func NewSubscriber ¶
func NewSubscriber(topics []string, messageChan chan<- PubSubMessage) *Subscriber
func (*Subscriber) Close ¶
func (s *Subscriber) Close()
Click to show internal directories.
Click to hide internal directories.