Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecWithQueue ¶
func ExecWithQueue(f func(q Definition))
Types ¶
type Container ¶
type Container interface {
// Get queue for queueId
Get(queueId string) (q Queue, found bool)
// Get queue for queueId. Panic when a queue is not found for the id.
MustGet(queueId string) Queue
// Wait for complete all queues
Wait()
// Suspend queue. Workers will be shutdown, but do not wait for worker shutdown.
Suspend() (session eq_bundle.Session, err error)
}
type Definition ¶
type Definition interface {
// Define a queue
Define(queueId string, f interface{}, ctx ...interface{})
// Traverse
Each(f func(queueId string, f interface{}, ctx []interface{}))
// Create a new container
Current() Container
// Restore container from the session
Restore(session eq_bundle.Session) (Container, error)
// Add error handler listener
AddErrorListener(h ErrorListener)
}
func New ¶
func New(opt ...Opt) Definition
type ErrorListener ¶
type ErrorListener eq_mould.ErrorListener
type Opt ¶
func AddErrorListener ¶
func AddErrorListener(eh eq_mould.ErrorListener) Opt
func FetchPolicy ¶
func FetchPolicy(p eq_bundle.FetchPolicy) Opt
func Progress ¶
func Progress(p eq_progress.Progress) Opt
Click to show internal directories.
Click to hide internal directories.