adapter

package
v4.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel interface {
	DeclareQueue(name string) error
	DeclareExchange(name string) error
	BindQueue(queue, exchange string) error

	BufferCapacity(value uint16) error
	Consume(consumerID, queue string) (<-chan amqp.Delivery, error)
	Ack(deliveryTag uint64, multiple bool) error
	CancelConsumer(consumerID string) error

	Publish(exchange, key string, envelope amqp.Publishing) error
	Tx() error
	TxCommit() error
	TxRollback() error

	io.Closer
}

type Config

type Config struct {
	Username    string
	Password    string
	VirtualHost string
}

type Connection

type Connection interface {
	Channel() (Channel, error)
	io.Closer
}

type Connector

type Connector interface {
	Connect(ctx context.Context, socket net.Conn, config Config) (Connection, error)
}

func New

func New() Connector

Jump to

Keyboard shortcuts

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