client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	ConsumerConfig
	// contains filtered or unexported fields
}

func NewConsumer

func NewConsumer(config ConsumerConfig) *Consumer

Initializes a new Consumer

func (*Consumer) Connect

func (c *Consumer) Connect() error

Connects to the broker

func (*Consumer) Disconnect

func (c *Consumer) Disconnect() error

Sends a disconnect signal to the broker and terminates the connection

func (*Consumer) Subscribe

func (c *Consumer) Subscribe() <-chan Event

Polls for events and sends them through a channel when it receives one

type ConsumerConfig

type ConsumerConfig struct {
	common.Config
	PollIntervalMs    int
	PollBackoff       bool
	MaxPollIntervalMs int
}

type Event

type Event struct {
	Payload []byte
	Error   error
}

type Producer

type Producer struct {
	common.Config
	// contains filtered or unexported fields
}

func NewProducer

func NewProducer(config common.Config) *Producer

Initializes a new Producer

func (*Producer) Connect

func (p *Producer) Connect() error

Connects to the broker

func (*Producer) Disconnect

func (p *Producer) Disconnect() error

Sends a disconnect signal to the broker and terminates the connection

func (*Producer) Produce

func (p *Producer) Produce(payload []byte)

Jump to

Keyboard shortcuts

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