Documentation ¶
Index ¶
- type Admin
- type AdminIOCInterface
- type AdminParam
- type Producer
- func (i *Producer) SendAsync(ctx context.Context, ...) error
- func (i *Producer) SendOneWay(ctx context.Context, mq ...*primitive.Message) error
- func (i *Producer) SendSync(ctx context.Context, mq ...*primitive.Message) (*primitive.SendResult, error)
- func (i *Producer) Shutdown() error
- func (i *Producer) Start() error
- type ProducerIOCInterface
- type ProducerParam
- type PushConsumer
- type PushConsumerIOCInterface
- type PushConsumerParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Admin ¶
func GetAdmin ¶
func GetAdmin(p *AdminParam) (*Admin, error)
func GetAdminSingleton ¶
func GetAdminSingleton(p *AdminParam) (*Admin, error)
func (*Admin) CreateTopic ¶
func (*Admin) DeleteTopic ¶
type AdminIOCInterface ¶
type AdminIOCInterface interface { CreateTopic(ctx contextx.Context, opts ...admin.OptionCreate) error DeleteTopic(ctx contextx.Context, opts ...admin.OptionDelete) error Close() error }
func GetAdminIOCInterface ¶
func GetAdminIOCInterface(p *AdminParam) (AdminIOCInterface, error)
func GetAdminIOCInterfaceSingleton ¶
func GetAdminIOCInterfaceSingleton(p *AdminParam) (AdminIOCInterface, error)
type AdminParam ¶
type AdminParam struct { NameServer primitive.NamesrvAddr Options []admin.AdminOption }
type Producer ¶
type Producer struct {
rocketmq.Producer
}
func GetProducer ¶
func GetProducer(p *ProducerParam) (*Producer, error)
func GetProducerSingleton ¶
func GetProducerSingleton(p *ProducerParam) (*Producer, error)
func (*Producer) SendOneWay ¶
type ProducerIOCInterface ¶
type ProducerIOCInterface interface { Start() error Shutdown() error SendSync(ctx contextx.Context, mq ...*primitive.Message) (*primitive.SendResult, error) SendAsync(ctx contextx.Context, mq func(ctx contextx.Context, result *primitive.SendResult, err error), msg ...*primitive.Message) error SendOneWay(ctx contextx.Context, mq ...*primitive.Message) error }
func GetProducerIOCInterface ¶
func GetProducerIOCInterface(p *ProducerParam) (ProducerIOCInterface, error)
func GetProducerIOCInterfaceSingleton ¶
func GetProducerIOCInterfaceSingleton(p *ProducerParam) (ProducerIOCInterface, error)
type ProducerParam ¶
type PushConsumer ¶
type PushConsumer struct {
rocketmq.PushConsumer
}
func GetPushConsumer ¶
func GetPushConsumer(p *PushConsumerParam) (*PushConsumer, error)
func GetPushConsumerSingleton ¶
func GetPushConsumerSingleton(p *PushConsumerParam) (*PushConsumer, error)
func (*PushConsumer) Shutdown ¶
func (i *PushConsumer) Shutdown() error
func (*PushConsumer) Start ¶
func (i *PushConsumer) Start() error
func (*PushConsumer) Subscribe ¶
func (i *PushConsumer) Subscribe(topic string, selector consumer.MessageSelector, f func(context.Context, ...*primitive.MessageExt) (consumer.ConsumeResult, error)) error
func (*PushConsumer) Unsubscribe ¶
func (i *PushConsumer) Unsubscribe(topic string) error
type PushConsumerIOCInterface ¶
type PushConsumerIOCInterface interface { Start() error Shutdown() error Subscribe(topic string, selector consumer.MessageSelector, f func(contextx.Context, ...*primitive.MessageExt) (consumer.ConsumeResult, error)) error Unsubscribe(topic string) error }
func GetPushConsumerIOCInterface ¶
func GetPushConsumerIOCInterface(p *PushConsumerParam) (PushConsumerIOCInterface, error)
func GetPushConsumerIOCInterfaceSingleton ¶
func GetPushConsumerIOCInterfaceSingleton(p *PushConsumerParam) (PushConsumerIOCInterface, error)
type PushConsumerParam ¶
type PushConsumerParam struct { NameServer primitive.NamesrvAddr GroupName string Retry int Options []consumer.Option }
func (*PushConsumerParam) New ¶
func (c *PushConsumerParam) New(impl *PushConsumer) (*PushConsumer, error)
Click to show internal directories.
Click to hide internal directories.