lib

package
v0.0.0-...-cfab22a Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2016 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CrawlTaskLessFunc

type CrawlTaskLessFunc func(t1, t2 *types.CrawlTask) bool

用于task比较大小的函数

type CrawlTaskSorter

type CrawlTaskSorter struct {
	Now int64
	// contains filtered or unexported fields
}

func (*CrawlTaskSorter) Len

func (this *CrawlTaskSorter) Len() int

func (*CrawlTaskSorter) Less

func (this *CrawlTaskSorter) Less(i, j int) bool

func (*CrawlTaskSorter) Sort

func (this *CrawlTaskSorter) Sort(tasks []types.CrawlTask, by CrawlTaskLessFunc)

func (*CrawlTaskSorter) Swap

func (this *CrawlTaskSorter) Swap(i, j int)

type CronJob

type CronJob struct {
	// contains filtered or unexported fields
}

func InitCronJob

func InitCronJob(f CronJobFunc, args []interface{}, period time.Duration) *CronJob

func (*CronJob) Run

func (this *CronJob) Run()

func (*CronJob) Stop

func (this *CronJob) Stop()

type CronJobFunc

type CronJobFunc func(...interface{})

type HttpClient

type HttpClient struct {
}

func (*HttpClient) EncodeQuery

func (this *HttpClient) EncodeQuery(params map[string]string) string

func (*HttpClient) Get

func (this *HttpClient) Get(url string) ([]byte, error)

func (*HttpClient) IconvHtml

func (this *HttpClient) IconvHtml(html []byte, destEncoding string) ([]byte, error)

func (*HttpClient) Post

func (this *HttpClient) Post(url string, params url.Values) ([]byte, error)

Jump to

Keyboard shortcuts

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