mq

package
v0.0.0-...-a97389e Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BrokerClosed = "broker closed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker interface {
	// contains filtered or unexported methods
}

type BrokerImpl

type BrokerImpl struct {
	sync.RWMutex // 同步锁
	// contains filtered or unexported fields
}

func NewBroker

func NewBroker() *BrokerImpl

type Client

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

func NewClient

func NewClient() *Client

func (*Client) Close

func (c *Client) Close()

func (*Client) GetPayLoad

func (c *Client) GetPayLoad(sub <-chan interface{}) interface{}

func (*Client) Publish

func (c *Client) Publish(topic string, msg interface{}) error

func (*Client) SetConditions

func (c *Client) SetConditions(capacity int)

func (*Client) Subscribe

func (c *Client) Subscribe(topic string) (<-chan interface{}, error)

func (*Client) Unsubscribe

func (c *Client) Unsubscribe(topic string, sub <-chan interface{}) error

Jump to

Keyboard shortcuts

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