messaging

package
v0.0.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2022 License: MIT Imports: 12 Imported by: 0

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 NewPublisher() (*Publisher, error)

func (*Publisher) Close

func (p *Publisher) Close()

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()

func (*Subscriber) Start

func (s *Subscriber) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL