Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { MaxDepth int // contains filtered or unexported fields }
Context provides a tiny layer for passing data between callbacks
func (*Context) Get ¶
Get retrieves a string value from Context. Get returns an empty string if key not found
type Engine ¶
type Option ¶
type Option func(*Engine)
func WithMaxDepth ¶
func WithPipeline ¶
func WithRandomUserAgent ¶
func WithScheduler ¶
func WithWorkerNum ¶
type ReadyNotifier ¶
type ReadyNotifier interface {
WorkerReady(chan Task)
}
type Scheduler ¶
type Scheduler interface { ReadyNotifier Run() Submit(Task) Worker() chan Task }
func NewTaskScheduler ¶
func NewTaskScheduler() Scheduler
type SimpleScheduler ¶
type SimpleScheduler struct {
// contains filtered or unexported fields
}
-------------------------------- SimpleScheduler -------------------------------------
func (*SimpleScheduler) Run ¶
func (s *SimpleScheduler) Run()
func (*SimpleScheduler) Submit ¶
func (s *SimpleScheduler) Submit(task Task)
func (*SimpleScheduler) Worker ¶
func (s *SimpleScheduler) Worker() chan Task
func (*SimpleScheduler) WorkerReady ¶
func (s *SimpleScheduler) WorkerReady(chan Task)
type TaskScheduler ¶
type TaskScheduler struct {
// contains filtered or unexported fields
}
func (TaskScheduler) Run ¶
func (s TaskScheduler) Run()
func (TaskScheduler) Submit ¶
func (s TaskScheduler) Submit(task Task)
func (TaskScheduler) Worker ¶
func (s TaskScheduler) Worker() chan Task
func (TaskScheduler) WorkerReady ¶
func (s TaskScheduler) WorkerReady(w chan Task)
Click to show internal directories.
Click to hide internal directories.