Documentation ¶
Index ¶
Constants ¶
View Source
const BootstrappedDispatcher = "BootstrappedDispatcher"
BootstrappedDispatcher is a key to access dispatcher
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶ added in v1.3.0
type Base struct {
// contains filtered or unexported fields
}
Base can be embeded to implement base interface functions.
func (Base) Next ¶ added in v1.3.0
Next returns the next task, if there is any, after the given task
func (Base) RunnerFunc ¶ added in v1.3.0
RunnerFunc returns runner func associated with the task
type Bootstrapper ¶ added in v1.3.0
type Bootstrapper struct{}
Bootstrapper implements bootstrap.Bootstrapper.
func (Bootstrapper) Bootstrap ¶ added in v1.3.0
func (b Bootstrapper) Bootstrap(ctx map[string]interface{}) error
Bootstrap adds transaction.Repository into context.
type Dispatcher ¶ added in v1.3.0
type Dispatcher interface { Name() string Start(ctx context.Context, wg *sync.WaitGroup, startupErr chan<- error) RegisterRunner(name string, runner gocelery.Runner) bool RegisterRunnerFunc(name string, runnerFunc gocelery.RunnerFunc) bool Dispatch(acc identity.DID, job *gocelery.Job) (Result, error) Job(acc identity.DID, jobID gocelery.JobID) (*gocelery.Job, error) Result(acc identity.DID, jobID gocelery.JobID) (Result, error) }
Dispatcher is a task dispatcher
func NewDispatcher ¶ added in v1.3.0
func NewDispatcher(db *leveldb.DB, workerCount int, requeueTimeout time.Duration) (Dispatcher, error)
NewDispatcher returns a new dispatcher with levelDB storage
Click to show internal directories.
Click to hide internal directories.