Documentation
¶
Index ¶
- type BusServiceImpl
- func (b *BusServiceImpl) Close(ctx context.Context)
- func (b *BusServiceImpl) GetConsumer(group, topic string) *kafka.Reader
- func (b *BusServiceImpl) GetProducer(topic string) *kafka.Writer
- func (b *BusServiceImpl) Init() error
- func (b *BusServiceImpl) Name() string
- func (i *BusServiceImpl) Priority() int
- func (b *BusServiceImpl) Publish(ctx context.Context, e *bus.Event) error
- func (b *BusServiceImpl) QueueSubscribe(ctx context.Context, subject string, cb bus.EventHandler) error
- func (b *BusServiceImpl) TopicSubscribe(ctx context.Context, subject string, cb bus.EventHandler) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BusServiceImpl ¶
type BusServiceImpl struct {
ioc.ObjectImpl
Group string `toml:"group" json:"group" yaml:"group" env:"GROUP"`
sync.Mutex
// contains filtered or unexported fields
}
func (*BusServiceImpl) Close ¶
func (b *BusServiceImpl) Close(ctx context.Context)
func (*BusServiceImpl) GetConsumer ¶
func (b *BusServiceImpl) GetConsumer(group, topic string) *kafka.Reader
func (*BusServiceImpl) GetProducer ¶
func (b *BusServiceImpl) GetProducer(topic string) *kafka.Writer
func (*BusServiceImpl) Init ¶
func (b *BusServiceImpl) Init() error
func (*BusServiceImpl) Name ¶
func (b *BusServiceImpl) Name() string
func (*BusServiceImpl) Priority ¶ added in v2.0.72
func (i *BusServiceImpl) Priority() int
func (*BusServiceImpl) QueueSubscribe ¶ added in v2.0.70
func (b *BusServiceImpl) QueueSubscribe(ctx context.Context, subject string, cb bus.EventHandler) error
订阅队列
func (*BusServiceImpl) TopicSubscribe ¶ added in v2.0.70
func (b *BusServiceImpl) TopicSubscribe(ctx context.Context, subject string, cb bus.EventHandler) error
订阅事件
Click to show internal directories.
Click to hide internal directories.