Versions in this module Expand all Collapse all v1 v1.0.1 Nov 6, 2020 v1.0.0 Nov 5, 2020 Changes in this version + const ReconnectInterval + var ErrMessageIsNotDelivery = errors.New("message is not delivery") + type Connection interface + GetChannel func() *amqp.Channel + GetConn func() *amqp.Connection + SetReconnectHooks func(...func()) + func NewConnection(options *ConnectionOptions) Connection + type ConnectionOptions struct + URI string + type ExchangeOptions struct + Args map[string]interface{} + IsAutoDeleted bool + IsDurable bool + IsInternal bool + Name string + NoWait bool + Type ExchangeType + type ExchangeType uint8 + const ExchangeTypeDirect + const ExchangeTypeFanout + const ExchangeTypeHeaders + const ExchangeTypeTopic + func (t ExchangeType) String() string + func (t ExchangeType) Value() ExchangeType + type Message struct + func NewMessage() *Message + func (m *Message) Ack() error + func (m *Message) GetAppID() string + func (m *Message) GetBody() []byte + func (m *Message) GetContentEncoding() string + func (m *Message) GetContentType() string + func (m *Message) GetCorrelationID() uuid.UUID + func (m *Message) GetDeliveryMode() uint8 + func (m *Message) GetExpiration() time.Duration + func (m *Message) GetExpirationString() string + func (m *Message) GetHeader(key string) interface{} + func (m *Message) GetHeaders() map[string]interface{} + func (m *Message) GetID() uuid.UUID + func (m *Message) GetPriority() uint8 + func (m *Message) GetReplyTo() string + func (m *Message) GetTimestamp() time.Time + func (m *Message) GetType() string + func (m *Message) GetUserID() string + func (m *Message) Nack() error + func (m *Message) Reject() error + func (m *Message) SetAppID(appID string) *Message + func (m *Message) SetBody(body []byte) *Message + func (m *Message) SetContentEncoding(v string) *Message + func (m *Message) SetContentType(v string) *Message + func (m *Message) SetCorrelationID(id uuid.UUID) *Message + func (m *Message) SetDeliveryModePersistent() *Message + func (m *Message) SetExpiration(expiration time.Duration) *Message + func (m *Message) SetHeader(key string, value interface{}) *Message + func (m *Message) SetPriority(priority uint8) *Message + func (m *Message) SetReplyTo(v string) *Message + func (m *Message) SetTimestamp(timestamp time.Time) *Message + func (m *Message) SetType(v string) *Message + func (m *Message) SetUserID(useID string) *Message + type PublishOptions struct + Exchange string + IsImmediate bool + IsMandatory bool + RoutingKey string + type Publisher interface + Publish func(options *PublishOptions, message *Message) error + func NewPublisher(options *PublisherOptions) Publisher + type PublisherOptions struct + URI string + type QueueOptions struct + AutoDelete bool + Durable bool + Exclusive bool + MaxPriority uint8 + Name string + NoWait bool + QueueBindArgs map[string]interface{} + RoutingKey string + func (o *QueueOptions) GetArgs() amqp.Table + type Subscriber interface + Subscribe func(handler func(message *Message)) + func NewSubscriber(options *SubscriberOptions) Subscriber + type SubscriberOptions struct + Args map[string]interface{} + AutoAck bool + ExchangeOptions *ExchangeOptions + Exclusive bool + MaxPriority uint8 + Name string + NoLocal bool + NoWait bool + PrefetchCount int + QueueOptions *QueueOptions + URI string