client

package
v0.0.0-...-32ff608 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RocketMQConsumer

type RocketMQConsumer interface {
	Start() error
	Shutdown() error
	Subscribe(topic string, selector consumer.MessageSelector, f SubscribeFunc) error
	Unsubscribe(topic string) error
	Suspend()
	Resume()
	IsBroadCasting() bool
}

RocketMQConsumer RocketMQ consumer interface

func NewRocketMQConsumerWrapper

func NewRocketMQConsumerWrapper(properties map[string]string) (RocketMQConsumer, error)

NewRocketMQConsumerWrapper get a consumer wrapper of RocketMQ client

type RocketMQConsumerWrapper

type RocketMQConsumerWrapper struct {
	// contains filtered or unexported fields
}

RocketMQConsumerWrapper consumer wrapper of RocketMQ client

func (*RocketMQConsumerWrapper) IsBroadCasting

func (r *RocketMQConsumerWrapper) IsBroadCasting() bool

IsBroadCasting check if consumer mode is broadcasting

func (*RocketMQConsumerWrapper) Resume

func (r *RocketMQConsumerWrapper) Resume()

Resume wrapper resume function

func (*RocketMQConsumerWrapper) Shutdown

func (r *RocketMQConsumerWrapper) Shutdown() error

Shutdown wrapper shutdown function

func (*RocketMQConsumerWrapper) Start

func (r *RocketMQConsumerWrapper) Start() error

Start wrapper start function

func (*RocketMQConsumerWrapper) Subscribe

func (r *RocketMQConsumerWrapper) Subscribe(topic string, selector consumer.MessageSelector, f SubscribeFunc) error

Subscribe wrapper subscribe function

func (*RocketMQConsumerWrapper) Suspend

func (r *RocketMQConsumerWrapper) Suspend()

Suspend wrapper suspend function

func (*RocketMQConsumerWrapper) Unsubscribe

func (r *RocketMQConsumerWrapper) Unsubscribe(topic string) error

Unsubscribe wrapper unsubscribe function

type RocketMQProducer

type RocketMQProducer interface {
	Start() error
	Shutdown() error
	SendSync(ctx context.Context, msg ...*primitive.Message) (*primitive.SendResult, error)
	SendAsync(ctx context.Context, mq func(ctx context.Context, result *primitive.SendResult, err error),
		msg ...*primitive.Message) error
	SendOneWay(ctx context.Context, msg ...*primitive.Message) error
	Request(ctx context.Context, ttl time.Duration, msg *primitive.Message) (*primitive.Message, error)
	RequestAsync(ctx context.Context, ttl time.Duration, callback func(ctx context.Context,
		msg *primitive.Message, err error), msg *primitive.Message) error
}

RocketMQProducer RocketMQ producer interface

type RocketMQProducerWrapper

type RocketMQProducerWrapper struct {
	// contains filtered or unexported fields
}

RocketMQProducerWrapper producer wrapper of RocketMQ client

func NewRocketMQProducerWrapper

func NewRocketMQProducerWrapper(properties map[string]string) (*RocketMQProducerWrapper, error)

NewRocketMQProducerWrapper get a producer wrapper of RocketMQ client

func (*RocketMQProducerWrapper) Request

Request wrapper request function

func (*RocketMQProducerWrapper) RequestAsync

func (r *RocketMQProducerWrapper) RequestAsync(ctx context.Context, ttl time.Duration,
	callback func(ctx context.Context, msg *primitive.Message, err error), msg *primitive.Message) error

RequestAsync wrapper request async function

func (*RocketMQProducerWrapper) SendAsync

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

SendAsync wrapper send async function

func (*RocketMQProducerWrapper) SendOneWay

func (r *RocketMQProducerWrapper) SendOneWay(ctx context.Context, msg ...*primitive.Message) error

SendOneWay wrapper send one way function

func (*RocketMQProducerWrapper) SendSync

SendSync wrapper send sync function

func (*RocketMQProducerWrapper) Shutdown

func (r *RocketMQProducerWrapper) Shutdown() error

Shutdown wrapper shutdown function

func (*RocketMQProducerWrapper) Start

func (r *RocketMQProducerWrapper) Start() error

Start wrapper start function

Jump to

Keyboard shortcuts

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