job

package
v0.0.0-...-b9f5497 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2017 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogFileUpdateRoom string = "update-room"
)

Variables

This section is empty.

Functions

func AddRequestEntity

func AddRequestEntity(entity *RequestEntity)

func CreateLogger

func CreateLogger(name string) *zap.Logger

func RunUpdateRoom

func RunUpdateRoom()

func StartCrawl

func StartCrawl()

Types

type BaseJob

type BaseJob struct {
	Logger *zap.Logger
}

func CreateJob

func CreateJob(name string) *BaseJob

func (BaseJob) WriteInfo

func (this BaseJob) WriteInfo(msg string, data string)

type RequestEntity

type RequestEntity struct {
	Tag            string
	URL            string
	RequestOptions *grequests.RequestOptions
	DataCallback   func(json string)
}

func CreateRequestEntity

func CreateRequestEntity(tag string, requestURL string, params map[string]string, dataCallback func(json string)) *RequestEntity

type ResponseEntity

type ResponseEntity struct {
	Tag  string
	Resp *grequests.Response
}

func CreateResponseEntity

func CreateResponseEntity(tag string, resp *grequests.Response) *ResponseEntity

type UpdateRoom

type UpdateRoom struct {
	*BaseJob
}

func (UpdateRoom) Run

func (this UpdateRoom) Run()

Jump to

Keyboard shortcuts

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