Versions in this module Expand all Collapse all v2 v2.3.0 Dec 25, 2021 Changes in this version + type Client struct + func NewClient(c config.Config) Client + func (c *Client) Clone() *Client + func (c *Client) GetResult(taskId string, timeout time.Duration, sleepTime time.Duration) (message.Result, error) + func (c *Client) GetStatus(taskId string, timeout time.Duration, sleepTime time.Duration) (int, error) + func (c *Client) NewPromise(taskId string, handle InvarParamFunc, timeout time.Duration, ...) *Promise + func (c *Client) Send(groupName string, workerName string, args ...interface{}) (string, error) + func (c *Client) SetTaskCtl(name int, value interface{}) *Client + type DelayServer struct + func NewDelayServer(groupName string, c config.Config, msgChan chan message.Message) DelayServer + func (b *DelayServer) BackendActivate() + func (b *DelayServer) BrokerActivate() + func (b *DelayServer) GetBackendPoolSize() int + func (b *DelayServer) GetBrokerPoolSize() int + func (b *DelayServer) GetResult(id string) (message.Result, error) + func (b *DelayServer) LSendMsg(groupName string, msg message.Message) error + func (b *DelayServer) Next(groupName string) (message.Message, error) + func (b *DelayServer) Send(groupName string, workerName string, ctl controller.TaskCtl, ...) (string, error) + func (b *DelayServer) SendMsg(groupName string, msg message.Message) error + func (b *DelayServer) SetBackendPoolSize(num int) + func (b *DelayServer) SetBrokerPoolSize(num int) + func (b *DelayServer) SetResult(result message.Result) error + func (b DelayServer) GetDelayGroupName(groupName string) string + func (b DelayServer) GetQueueName(groupName string) string + func (s *DelayServer) GetDelayMsgGoroutine() + func (s *DelayServer) GetDelayMsgGoroutine_UpdateQueue(msg message.Message) + func (s *DelayServer) GetReadyMsgGoroutine() + func (s *DelayServer) GetReadyMsgGoroutine_Send(msg message.Message) (err error) + func (s *DelayServer) IsRunning() bool + func (s *DelayServer) IsStop() bool + func (s *DelayServer) LSendQueue() + func (s *DelayServer) Run() + func (s *DelayServer) SendReadyMsgGoroutine() + func (s *DelayServer) SendReadyMsgGoroutine_Send(msg message.Message) (err error) + func (s *DelayServer) SetRunning() + func (s *DelayServer) SetStop() + func (s *DelayServer) Shutdown(ctx context.Context) error + type InlineServer struct + func NewInlineServer(groupName string, c config.Config) InlineServer + func (b *InlineServer) BackendActivate() + func (b *InlineServer) BrokerActivate() + func (b *InlineServer) GetBackendPoolSize() int + func (b *InlineServer) GetBrokerPoolSize() int + func (b *InlineServer) GetResult(id string) (message.Result, error) + func (b *InlineServer) LSendMsg(groupName string, msg message.Message) error + func (b *InlineServer) Next(groupName string) (message.Message, error) + func (b *InlineServer) Send(groupName string, workerName string, ctl controller.TaskCtl, ...) (string, error) + func (b *InlineServer) SendMsg(groupName string, msg message.Message) error + func (b *InlineServer) SetBackendPoolSize(num int) + func (b *InlineServer) SetBrokerPoolSize(num int) + func (b *InlineServer) SetResult(result message.Result) error + func (b InlineServer) GetDelayGroupName(groupName string) string + func (b InlineServer) GetQueueName(groupName string) string + func (t *InlineServer) Add(workerName string, w interface{}) + func (t *InlineServer) GetDelayMessageGoroutine() + func (t *InlineServer) GetNextMessageGoroutine() + func (t *InlineServer) IsRunning() bool + func (t *InlineServer) IsStop() bool + func (t *InlineServer) MakeWorkerReady() + func (t *InlineServer) Run(numWorkers int) + func (t *InlineServer) SetRunning() + func (t *InlineServer) SetStop() + func (t *InlineServer) Shutdown(ctx context.Context) error + func (t *InlineServer) WorkerGoroutine() + type InvarParamFunc func(message.Result) (interface{}, error) + type Promise struct + func (p *Promise) Done() (interface{}, error) + func (p *Promise) Then(handle VarParamFunc) *Promise + type Server struct + DelayServerMap map[string]*DelayServer + ServerMap map[string]*InlineServer + func NewServer(c config.Config) Server + func (t *Server) Add(groupName string, workerName string, w interface{}) + func (t *Server) GetClient() Client + func (t *Server) Run(groupName string, numWorkers int, enableDelayServer ...bool) + func (t *Server) Shutdown(ctx context.Context) error + type SortQueue struct + Queue [maxLen + 1]message.Message + func (s *SortQueue) Get(i int) message.Message + func (s *SortQueue) Insert(msg message.Message) *message.Message + func (s *SortQueue) IsFull() bool + func (s *SortQueue) Pop() *message.Message + type VarParamFunc func(interface{}) (interface{}, error)