rocketmq

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	admin.Admin
}

func GetAdmin

func GetAdmin(p *AdminParam) (*Admin, error)

func GetAdminSingleton

func GetAdminSingleton(p *AdminParam) (*Admin, error)

func (*Admin) Close

func (i *Admin) Close() error

func (*Admin) CreateTopic

func (i *Admin) CreateTopic(ctx context.Context, opts ...admin.OptionCreate) error

func (*Admin) DeleteTopic

func (i *Admin) DeleteTopic(ctx context.Context, opts ...admin.OptionDelete) error

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
}

func (*AdminParam) New

func (c *AdminParam) New(impl *Admin) (*Admin, error)

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) SendAsync

func (i *Producer) SendAsync(ctx context.Context, mq func(ctx context.Context, result *primitive.SendResult, err error), msg ...*primitive.Message) error

func (*Producer) SendOneWay

func (i *Producer) SendOneWay(ctx context.Context, mq ...*primitive.Message) error

func (*Producer) SendSync

func (i *Producer) SendSync(ctx context.Context, mq ...*primitive.Message) (*primitive.SendResult, error)

func (*Producer) Shutdown

func (i *Producer) Shutdown() error

func (*Producer) Start

func (i *Producer) Start() error

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 ProducerParam struct {
	NameServer primitive.NamesrvAddr
	GroupName  string
	Retry      int
	Options    []producer.Option
}

func (*ProducerParam) New

func (c *ProducerParam) New(impl *Producer) (*Producer, error)

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 (*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

type ThisAdmin added in v1.0.1

type ThisAdmin struct {
}

func (*ThisAdmin) This added in v1.0.1

func (t *ThisAdmin) This() AdminIOCInterface

type ThisProducer added in v1.0.1

type ThisProducer struct {
}

func (*ThisProducer) This added in v1.0.1

type ThisPushConsumer added in v1.0.1

type ThisPushConsumer struct {
}

func (*ThisPushConsumer) This added in v1.0.1

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL