Documentation ¶
Index ¶
- Variables
- type ConnectionRegister
- type Dispatcher
- type Manager
- func (m *Manager) Close(workers ...string)
- func (m *Manager) GetConnection(connection string) (contracts.Connection, error)
- func (m *Manager) GetWorker(worker string) (contracts.Worker, bool)
- func (m *Manager) RegisterConnection(connection string, cr ConnectionRegister)
- func (m *Manager) RegisterWorker(name string, worker contracts.Worker)
- func (m *Manager) Work(done chan struct{}, workers ...string)
- type PayloadHolder
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultManager = NewManager()
Functions ¶
This section is empty.
Types ¶
type ConnectionRegister ¶
type ConnectionRegister func() (contracts.Connection, error)
type Dispatcher ¶
type Dispatcher struct {
DefaultConnection string
}
var DefaultDispatcher Dispatcher
func (Dispatcher) After ¶
func (d Dispatcher) After(delay time.Duration) *PayloadHolder
func (Dispatcher) Dispatch ¶
func (d Dispatcher) Dispatch(payload interface{}) error
func (Dispatcher) On ¶
func (d Dispatcher) On(on string) *PayloadHolder
type Manager ¶
type Manager struct { ErrorHandler contracts.ErrorHandler // contains filtered or unexported fields }
func NewManager ¶
func NewManager() *Manager
func (*Manager) GetConnection ¶
func (m *Manager) GetConnection(connection string) (contracts.Connection, error)
GetConnection, get queue connection
func (*Manager) RegisterConnection ¶
func (m *Manager) RegisterConnection(connection string, cr ConnectionRegister)
RegisterConnection, register queue connection
func (*Manager) RegisterWorker ¶
RegisterWorker, register queue worker
type PayloadHolder ¶
type PayloadHolder struct {
// contains filtered or unexported fields
}
func (*PayloadHolder) After ¶
func (ph *PayloadHolder) After(delay time.Duration) *PayloadHolder
func (*PayloadHolder) Dispatch ¶
func (ph *PayloadHolder) Dispatch(payload ...interface{}) error
func (*PayloadHolder) On ¶
func (ph *PayloadHolder) On(on string) *PayloadHolder
Click to show internal directories.
Click to hide internal directories.