Documentation ¶
Index ¶
- func NewMessage() v2.Message
- func NewPublisher(options *PublisherOptions) v2.Publisher
- func NewSubscriber(options *SubscriberOptions) v2.Subscriber
- type Connection
- type ConnectionOptions
- type ExchangeOptions
- type ExchangeType
- type Message
- func (m *Message) Ack() error
- func (m *Message) AppID() string
- func (m *Message) Body() []byte
- func (m *Message) ContentEncoding() string
- func (m *Message) ContentType() string
- func (m *Message) CorrelationID() uuid.UUID
- func (m *Message) DeliveryMode() uint8
- func (m *Message) Expiration() time.Duration
- func (m *Message) GetHeader(key string) interface{}
- func (m *Message) Headers() map[string]interface{}
- func (m *Message) ID() uuid.UUID
- func (m *Message) Nack() error
- func (m *Message) Priority() uint8
- func (m *Message) Reject() error
- func (m *Message) ReplyTo() string
- func (m *Message) SetAppID(appID string) v2.Message
- func (m *Message) SetBody(body []byte) v2.Message
- func (m *Message) SetContentEncoding(v string) v2.Message
- func (m *Message) SetContentType(v string) v2.Message
- func (m *Message) SetCorrelationID(id uuid.UUID) v2.Message
- func (m *Message) SetDeliveryModePersistent() v2.Message
- func (m *Message) SetExpiration(expiration time.Duration) v2.Message
- func (m *Message) SetHeader(key string, value interface{}) v2.Message
- func (m *Message) SetHeaders(headers map[string]interface{}) v2.Message
- func (m *Message) SetPriority(priority uint8) v2.Message
- func (m *Message) SetReplyTo(v string) v2.Message
- func (m *Message) SetTimestamp(timestamp time.Time) v2.Message
- func (m *Message) SetType(v string) v2.Message
- func (m *Message) SetUserID(useID string) v2.Message
- func (m *Message) Timestamp() time.Time
- func (m *Message) Type() string
- func (m *Message) UserID() string
- type PublishOptions
- type PublisherOptions
- type QueueOptions
- type SubscriberOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMessage ¶
func NewPublisher ¶
func NewPublisher(options *PublisherOptions) v2.Publisher
func NewSubscriber ¶
func NewSubscriber(options *SubscriberOptions) v2.Subscriber
Types ¶
type Connection ¶
type Connection interface { GetConn() *amqp.Connection GetChannel() *amqp.Channel SetReconnectHooks(...func()) }
func NewConnection ¶
func NewConnection(options *ConnectionOptions) Connection
type ConnectionOptions ¶
type ExchangeOptions ¶
type ExchangeType ¶
type ExchangeType uint8
const ( ExchangeTypeDirect ExchangeType = iota ExchangeTypeFanout ExchangeTypeTopic ExchangeTypeHeaders )
func (ExchangeType) String ¶
func (t ExchangeType) String() string
func (ExchangeType) Value ¶
func (t ExchangeType) Value() ExchangeType
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func (*Message) ContentEncoding ¶
func (*Message) ContentType ¶
func (*Message) CorrelationID ¶
func (*Message) DeliveryMode ¶
func (*Message) Expiration ¶
func (*Message) SetDeliveryModePersistent ¶
func (*Message) SetExpiration ¶
func (*Message) SetHeaders ¶
type PublishOptions ¶
type PublisherOptions ¶
type PublisherOptions struct {
ConnectionOptions *ConnectionOptions
}
type QueueOptions ¶
type QueueOptions struct { Name string Durable bool AutoDelete bool Exclusive bool NoWait bool MaxPriority uint8 RoutingKey string QueueBindArgs map[string]interface{} }
func (*QueueOptions) GetArgs ¶
func (o *QueueOptions) GetArgs() amqp.Table
type SubscriberOptions ¶
type SubscriberOptions struct { ConnectionOptions *ConnectionOptions QueueOptions *QueueOptions ExchangeOptions *ExchangeOptions PrefetchCount int Name string AutoAck bool NoWait bool NoLocal bool Exclusive bool Args map[string]interface{} }
Click to show internal directories.
Click to hide internal directories.