Documentation ¶
Index ¶
- type Server
- func (s *Server) ParseConfig(configPaths ...interface{}) (err error)
- func (s *Server) Send(ctx context.Context, taskSignatures ...*tasks.Signature) ([]*result.AsyncResult, error)
- func (s *Server) SendChain(ctx context.Context, taskSignatures ...*tasks.Signature) (*result.ChainAsyncResult, error)
- func (s *Server) SendGroup(ctx context.Context, sendConcurrency int, taskSignatures ...*tasks.Signature) ([]*result.AsyncResult, error)
- func (s *Server) SendGroupWithChord(ctx context.Context, sendConcurrency int, chordTask *tasks.Signature, ...) (*result.ChordAsyncResult, error)
- func (s *Server) StartWorker(options ...WorkerOption) error
- type Task
- type TaskArg
- type TaskArgs
- type WorkerConfig
- type WorkerOption
- func Concurrency(concurrency int) WorkerOption
- func ConsumerTag(tag string) WorkerOption
- func ErrorHandler(errorHandler func(err error)) WorkerOption
- func PostTaskHandler(postTaskHandler func(signature *tasks.Signature)) WorkerOption
- func PreTaskHandler(preTaskHandler func(signature *tasks.Signature)) WorkerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { *machinery.Server // contains filtered or unexported fields }
func (*Server) ParseConfig ¶
func (*Server) Send ¶
func (s *Server) Send(ctx context.Context, taskSignatures ...*tasks.Signature) ([]*result.AsyncResult, error)
Send 发送到队列
func (*Server) SendGroupWithChord ¶
func (*Server) StartWorker ¶
func (s *Server) StartWorker(options ...WorkerOption) error
type WorkerConfig ¶
type WorkerOption ¶
type WorkerOption func(*WorkerConfig)
func Concurrency ¶
func Concurrency(concurrency int) WorkerOption
func ConsumerTag ¶
func ConsumerTag(tag string) WorkerOption
func ErrorHandler ¶
func ErrorHandler(errorHandler func(err error)) WorkerOption
func PostTaskHandler ¶
func PostTaskHandler(postTaskHandler func(signature *tasks.Signature)) WorkerOption
func PreTaskHandler ¶
func PreTaskHandler(preTaskHandler func(signature *tasks.Signature)) WorkerOption
Click to show internal directories.
Click to hide internal directories.