Documentation ¶
Index ¶
- type Client
- type Delivery
- type MessageHandler
- type RabbitClient
- func (client *RabbitClient) Call(ctx context.Context, request Delivery) (Response, error)
- func (client *RabbitClient) Cast(ctx context.Context, request Delivery) error
- func (client *RabbitClient) Connect() error
- func (client *RabbitClient) Init(initializer TopologyInitializer) error
- func (client *RabbitClient) Listen(ctx context.Context, queue string, autoAck, exclusive, noLocal, noWait bool, ...) chan error
- func (client *RabbitClient) Stop() error
- type ReplyFunc
- type Response
- type TopologyInitializer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Connect() error Init(initializer TopologyInitializer) error Cast(ctx context.Context, request Delivery) error Call(ctx context.Context, request Delivery) (Response, error) Listen(ctx context.Context, queue string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table, handler MessageHandler) chan error Stop() error }
type MessageHandler ¶
type RabbitClient ¶
type RabbitClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(url string, logger log.FieldLogger, timeout int) (*RabbitClient, error)
Create a new RabbitMQ Client with the given AMQP URL (e.g. amqp://localhost:5672/), logger instance and timeout (in seconds)
func (*RabbitClient) Cast ¶
func (client *RabbitClient) Cast(ctx context.Context, request Delivery) error
Perform an async publishing
func (*RabbitClient) Connect ¶
func (client *RabbitClient) Connect() error
func (*RabbitClient) Init ¶
func (client *RabbitClient) Init(initializer TopologyInitializer) error
func (*RabbitClient) Listen ¶
func (client *RabbitClient) Listen(ctx context.Context, queue string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table, handler MessageHandler) chan error
func (*RabbitClient) Stop ¶
func (client *RabbitClient) Stop() error
type ReplyFunc ¶
func CreateReplyFunc ¶
func CreateReplyFunc(client *RabbitClient) ReplyFunc
type TopologyInitializer ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.