task

package
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChildTask

type ChildTask struct {
	CrawlerName   CrawlerName            `json:"crawler_name"`
	Index         int                    `json:"index"`
	TempStorageId string                 `json:"temp_storage_id"`
	TinyExtras    map[string]interface{} `json:"tiny_extras"`
	CrawlerUrl    string                 `json:"crawler_url"`
	ContentType   string                 `json:"content_type"`
	Method        string                 `json:"method"`
	Param         string                 `json:"param"`
	Header        map[string]string      `json:"header"`
}

type CrawlerName

type CrawlerName string

type Task

type Task struct {
	CrawlerName   CrawlerName            `json:"crawler_name"`
	Website       string                 `json:"website"`
	GlobalId      string                 `json:"global_id"`
	ParentId      string                 `json:"parent_id"`
	TaskId        string                 `json:"task_id"`
	Depth         int                    `json:"depth"`
	Index         int                    `json:"index"`
	TempStorageId string                 `json:"temp_storage_id"`
	TinyExtras    map[string]interface{} `json:"tiny_extras"`
	CrawlerUrl    string                 `json:"crawler_url"`
	ContentType   string                 `json:"content_type"`
	Method        string                 `json:"method"`
	Param         string                 `json:"param"`
	Header        map[string]string      `json:"header"`
	Retry         int                    `json:"redirect"`
	Total         int                    `json:"total"`
	Timeout       time.Duration          `json:"timeout"`
	Time          int64                  `json:"time"`
	Redis         *redis.Client          `json:"-"`
}

func (*Task) Next

func (t *Task) Next(ctx context.Context, queue string, child ChildTask) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL