Documentation ¶
Index ¶
- Constants
- type Engine
- func (m *Engine) AddSpider(spider *spider.Spider) *Engine
- func (m *Engine) EndTask(name string) error
- func (m *Engine) GetTaskMetas() map[string]*TaskMeta
- func (m *Engine) ListTask() []*spider.Spider
- func (m *Engine) Run()
- func (m *Engine) RunTask(name string) error
- func (m *Engine) StopTask(name string) error
- type SpiderRuntime
- type TaskMeta
Constants ¶
View Source
const Default_WorkNum = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) GetTaskMetas ¶
type SpiderRuntime ¶
type SpiderRuntime struct { sync.Mutex TaskMeta *TaskMeta // contains filtered or unexported fields }
func NewSpiderRuntime ¶
func NewSpiderRuntime() *SpiderRuntime
func (*SpiderRuntime) Exit ¶
func (s *SpiderRuntime) Exit()
func (*SpiderRuntime) GetSpider ¶
func (s *SpiderRuntime) GetSpider() *spider.Spider
func (*SpiderRuntime) Run ¶
func (s *SpiderRuntime) Run()
func (*SpiderRuntime) SetSpider ¶
func (s *SpiderRuntime) SetSpider(spider *spider.Spider)
func (*SpiderRuntime) Stop ¶
func (s *SpiderRuntime) Stop()
Click to show internal directories.
Click to hide internal directories.