client

package module
v0.0.0-...-3ea8f42 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

type Publisher struct {
	// contains filtered or unexported fields
}

func NewPublisher

func NewPublisher(opts ...PublisherConfig) (*Publisher, error)

func (*Publisher) Close

func (p *Publisher) Close()

func (*Publisher) Publish

func (p *Publisher) Publish(_ string, data *[]byte) error

Writing to TCP conn has to be single threaded to correctly serialize.

type PublisherConfig

type PublisherConfig func(p *Publisher)

func PublisherBrokerAddress

func PublisherBrokerAddress(addr string) PublisherConfig

func PublisherTopic

func PublisherTopic(topic string) PublisherConfig

type Subscriber

type Subscriber struct {
	// contains filtered or unexported fields
}

func NewSubscriber

func NewSubscriber(opts ...SubscriberConfig) (*Subscriber, error)

func (*Subscriber) Close

func (s *Subscriber) Close()

func (*Subscriber) Read

func (s *Subscriber) Read() ([]byte, error)

type SubscriberConfig

type SubscriberConfig func(p *Subscriber)

func SubscriberBrokerAddress

func SubscriberBrokerAddress(addr string) SubscriberConfig

func SubscriberTopic

func SubscriberTopic(topic string) SubscriberConfig

Jump to

Keyboard shortcuts

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