Versions in this module Expand all Collapse all v0 v0.0.2 Sep 1, 2024 v0.0.1 Aug 31, 2024 Changes in this version + type Consumer interface + Pull func(context context.Context, option ...PullOption) (*Message, error) + Puller func(option ...PullOption) <-chan *Message + func NewRabbitConsumer(conf *config.LocalConfigure, logger log.Logger, conn *connProxy, ...) (Consumer, error) + type ExchangePushOption struct + ExchangeName string + func WithExchange(exchange string) ExchangePushOption + func (p *ExchangePushOption) Do(opt *defaultOpt) + type Message struct + App string + ContentEncoding string + ContentType string + Exchange string + MessageId string + Payload []byte + Priority int + Queue string + RoutingKey string + Timestamp time.Time + func (m *Message) Ack() + func (m *Message) UnmarshalPayload(obj interface{}) error + type MsgIdPushOption struct + MessageId string + func WithMessageId(msgId string) MsgIdPushOption + func (p *MsgIdPushOption) Do(opt *defaultOpt) + type PriorityPushOption struct + Priority uint8 + func WithPriority(priority uint8) PriorityPushOption + func (p *PriorityPushOption) Do(opt *defaultOpt) + type Producer interface + Push func(context context.Context, data interface{}, option ...PushOption) error + func NewRabbitProducer(conf *config.LocalConfigure, logger log.Logger, conn *connProxy, ...) (Producer, error) + type PullOption interface + Do func(opt *defaultOpt) + type PushOption interface + Do func(opt *defaultOpt) + type QueueFactory interface + Consumer func(topic *TopicConfig) (Consumer, error) + Producer func(topic *TopicConfig) (Producer, error) + func NewQueueFactory(logger log.Logger, conf *def.Configuration, local *config.LocalConfigure) (QueueFactory, error) + type RoutingKeyPushOption struct + RoutingKey string + func WithRoutingKey(key string) RoutingKeyPushOption + func (p *RoutingKeyPushOption) Do(opt *defaultOpt) + type TopicConfig struct + Consume *def.ConsumeConfig + Exchange *def.ExchangeConfig + Queue *def.QueueConfig + func NewConsumerConfig(qe *def.QueueConfig, con *def.ConsumeConfig) *TopicConfig + func NewProducerConfig(ex *def.ExchangeConfig, qe *def.QueueConfig) *TopicConfig