rabbitmq

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPort      = 5672
	ManagementUIPort = 15672

	ExchangeTypeDirect = "direct"
	ExchangeTypeTopic  = "topic"
	ExchangeTypeFanout = "fanout"
)

Variables

This section is empty.

Functions

func WithConsumerRoutingKeys

func WithConsumerRoutingKeys(routingKeys ...string) func(c *Client)

func WithExchangeName

func WithExchangeName(exchangeName string) func(c *Client)

func WithExchangeType

func WithExchangeType(exchangeType string) func(c *Client)

func WithPort

func WithPort(port uint) func(c *Client)

func WithQueueName

func WithQueueName(queueName string) func(c *Client)

Types

type Client

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

func NewClient

func NewClient(opts ...ConsumerOpt) (*Client, error)

func (*Client) Close

func (r *Client) Close() error

func (*Client) Consume

func (r *Client) Consume() (<-chan messages.Message, error)

func (*Client) Publish

func (r *Client) Publish(ctx context.Context, message []byte, routingKey string) error

func (*Client) QueueName

func (r *Client) QueueName() string

type ConsumerOpt

type ConsumerOpt func(consumer *Client)

Jump to

Keyboard shortcuts

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