Documentation ¶
Index ¶
- func CallbackWrapHandler(handler SubHandler, callback CallbackFunc) storage.ConsumerFunc
- func WrapHandler(handler SubHandler) storage.ConsumerFunc
- type CallbackFunc
- type Handler
- type MemorySpec
- type MemoryTask
- type NsqSpec
- type NsqTask
- type RabbitMqService
- type RabbitMqSpec
- type RabbitMqTask
- type RocketMqSpec
- type RocketMqTask
- type Service
- type SubHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallbackWrapHandler ¶
func CallbackWrapHandler(handler SubHandler, callback CallbackFunc) storage.ConsumerFunc
func WrapHandler ¶
func WrapHandler(handler SubHandler) storage.ConsumerFunc
Types ¶
type CallbackFunc ¶
CallbackFunc 消费结果统一回调
type MemorySpec ¶
type MemoryTask ¶
type MemoryTask interface { GetSpec() *MemorySpec Handler }
type RabbitMqService ¶ added in v0.1.4
type RabbitMqService interface { Service AddTasks(task ...RabbitMqTask) RabbitMqService }
type RabbitMqSpec ¶
type RabbitMqSpec struct { TaskName string RoutingKeys []string RoutingKey string Exchange string ExchangeType string QueueName string RoutingMap map[string]SubHandler ConsumerNum int AutoAck bool }
func (*RabbitMqSpec) GetRoutingKeys ¶
func (r *RabbitMqSpec) GetRoutingKeys() []string
func (*RabbitMqSpec) Route ¶
func (r *RabbitMqSpec) Route(routingKey string) (handler SubHandler, ifExist bool)
type RabbitMqTask ¶
type RabbitMqTask interface { GetSpec(ctx context.Context) *RabbitMqSpec Handler }
type RocketMqSpec ¶
type RocketMqTask ¶
type RocketMqTask interface { GetSpec(ctx context.Context) *RocketMqSpec Handler }
Click to show internal directories.
Click to hide internal directories.