Documentation ¶
Index ¶
- Constants
- func CallbackWrapHandler(handler SubTask, callback CallbackFunc) storage.ConsumerFunc
- func Services() *tService
- func WrapHandler(handler SubTask) storage.ConsumerFunc
- type CallbackFunc
- type Handler
- 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 Service
- type SubTask
- type TasksService
Constants ¶
View Source
const (
DefaultQueue = "default"
)
View Source
const (
SrvName = "TaskService"
)
Variables ¶
This section is empty.
Functions ¶
func CallbackWrapHandler ¶
func CallbackWrapHandler(handler SubTask, callback CallbackFunc) storage.ConsumerFunc
func WrapHandler ¶
func WrapHandler(handler SubTask) storage.ConsumerFunc
Types ¶
type CallbackFunc ¶
CallbackFunc 消费结果统一回调
type MemoryService ¶ added in v0.1.5
type MemoryService interface { Service AddTasks(task ...MemoryTask) MemoryService }
type MemorySpec ¶
type MemoryTask ¶
type MemoryTask interface { GetSpec() *MemorySpec Handler }
type NsqService ¶ added in v0.1.5
type NsqService interface { Service AddTasks(task ...NsqTask) NsqService }
type RabbitMqService ¶ added in v0.1.4
type RabbitMqService interface { Service AddTasks(task ...RabbitMqTask) RabbitMqService }
type RabbitMqSpec ¶
type RabbitMqSpec struct { TaskName string Vhost string RoutingKeys []string RoutingKey string Exchange string ExchangeType string QueueName string SubTasks []SubTask ConsumerNum int CoroutineNum int Prefetch int AutoAck bool }
func (*RabbitMqSpec) GetRoutingKeys ¶
func (r *RabbitMqSpec) GetRoutingKeys() []string
type RabbitMqTask ¶
type RabbitMqTask interface { GetSpec(ctx context.Context) *RabbitMqSpec Handler }
type RocketMqService ¶ added in v0.1.5
type RocketMqService interface { Service AddTasks(task ...RocketMqTask) RocketMqService }
type RocketMqSpec ¶
type RocketMqTask ¶
type RocketMqTask interface { GetSpec(ctx context.Context) *RocketMqSpec Handler }
type TasksService ¶ added in v0.1.9
type TasksService interface { Service AddServices(services ...Service) TasksService }
Click to show internal directories.
Click to hide internal directories.