Documentation ¶
Index ¶
- Constants
- func CallbackWrapHandler(handler SubTask, callback CallbackFunc) queue.ConsumerFunc
- func WrapHandler(handler SubTask) queue.ConsumerFunc
- type CallbackFunc
- type IHandler
- type IService
- type IServiceAppend
- type MemoryService
- type MemorySpec
- type MemoryTask
- type NsqService
- type NsqSpec
- type NsqTask
- type RabbitMqService
- type RabbitMqSpec
- type RabbitMqTask
- type RocketMqService
- type RocketMqSpec
- type RocketMqTask
- type RouteTask
- type SubTask
- type TasksService
Constants ¶
View Source
const (
DefaultQueue = "default"
)
Variables ¶
This section is empty.
Functions ¶
func CallbackWrapHandler ¶
func CallbackWrapHandler(handler SubTask, callback CallbackFunc) queue.ConsumerFunc
func WrapHandler ¶
func WrapHandler(handler SubTask) queue.ConsumerFunc
Types ¶
type CallbackFunc ¶
CallbackFunc 消费结果统一回调
type IServiceAppend ¶ added in v2.0.45
type IServiceAppend interface {
AppendStart(ctx context.Context, Routers []RabbitMqTask)
}
type MemoryService ¶
type MemoryService interface { IService AddTasks(task ...MemoryTask) MemoryService }
type MemorySpec ¶
type MemoryTask ¶
type MemoryTask interface { GetSpec() *MemorySpec IHandler }
type NsqService ¶
type NsqService interface { IService AddTasks(task ...NsqTask) NsqService }
type RabbitMqService ¶
type RabbitMqService interface { IService IServiceAppend AddTasks(task ...RabbitMqTask) RabbitMqService }
type RabbitMqSpec ¶
type RabbitMqSpec struct { TaskName string Group string Vhost string RoutingKeys []string RoutingKey string Exchange string ExchangeType string QueueName string SubTasks []SubTask ConsumerNum int CoroutineNum int Prefetch int AutoAck bool Passive bool // if false, a missing exchange will be created on the server Declare bool QueueDeclare bool Durable bool }
func (*RabbitMqSpec) GetRoutingKeys ¶
func (r *RabbitMqSpec) GetRoutingKeys() []string
type RabbitMqTask ¶
type RabbitMqTask interface { GetSpec(ctx context.Context) *RabbitMqSpec IHandler }
type RocketMqService ¶
type RocketMqService interface { IService AddTasks(task ...RocketMqTask) RocketMqService }
type RocketMqSpec ¶
type RocketMqTask ¶
type RocketMqTask interface { GetSpec(ctx context.Context) *RocketMqSpec IHandler }
type TasksService ¶
type TasksService interface { IService AddServices(services ...IService) TasksService }
Click to show internal directories.
Click to hide internal directories.