Documentation
¶
Index ¶
Constants ¶
View Source
const (
BrokerKey = "_beanbroker_"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobBroker ¶
type JobBroker interface {
// RegisterWorker registers the worker and a new connection to a tube is created
RegisterWorker(w Worker, jobType JobType, reservationTimeout time.Duration)
// PostJob puts a job request to be dispatched to matched workers
PostJob(*JobRequest) error
}
JobBroker represents central contact point for worker and job poster
type JobRequest ¶
type JobRequest struct {
Type JobType
Data JobData
Priority uint32
Delay time.Duration
TTR time.Duration
}
JobRequest represents job request
type JobResult ¶
type JobResult int
JobResult represents the expected action done by broker after Do() returns
Click to show internal directories.
Click to hide internal directories.