app

package module
v0.0.0-...-ad5c98e Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogicApp = New()

Functions

This section is empty.

Types

type App

type App interface {
	Init(mode int, port int, master string, w ...io.Writer) App
	ReInit(mode int, port int, master string, w ...io.Writer) App
	GetAppConf(k ...string) interface{}
	SetAppConf(k string, v interface{}) App
	SpiderPrepare(original []*spider.Spider) App

	Run()
	Stop()
	IsRunning() bool
	IsPause() bool
	IsStopped() bool
	PauseRecover()
	Status() int

	GetSpiderLib() []*spider.Spider
	GetSpiderByName(string) *spider.Spider
	GetSpiderQueue() crawler.SpiderQueue
	GetOutputLib() []string
	GetTaskJar() *distribute.TaskJar
	distribute.Distributer
}

func New

func New() App

type Logic

type Logic struct {
	*cache.AppConf
	*spider.SpiderSpecies
	crawler.SpiderQueue
	*distribute.TaskJar
	crawler.CrawlerPool
	teleport.Teleport

	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Logic) CountNodes

func (self *Logic) CountNodes() int

func (*Logic) GetAppConf

func (self *Logic) GetAppConf(k ...string) interface{}

func (*Logic) GetMode

func (self *Logic) GetMode() int

func (*Logic) GetOutputLib

func (self *Logic) GetOutputLib() []string

func (*Logic) GetSpiderByName

func (self *Logic) GetSpiderByName(name string) *spider.Spider

func (*Logic) GetSpiderLib

func (self *Logic) GetSpiderLib() []*spider.Spider

func (*Logic) GetSpiderQueue

func (self *Logic) GetSpiderQueue() crawler.SpiderQueue

func (*Logic) GetTaskJar

func (self *Logic) GetTaskJar() *distribute.TaskJar

func (*Logic) Init

func (self *Logic) Init(mode int, port int, master string, w ...io.Writer) App

func (*Logic) IsPause

func (self *Logic) IsPause() bool

func (*Logic) IsRunning

func (self *Logic) IsRunning() bool

func (*Logic) IsStopped

func (self *Logic) IsStopped() bool

func (*Logic) PauseRecover

func (self *Logic) PauseRecover()

func (*Logic) ReInit

func (self *Logic) ReInit(mode int, port int, master string, w ...io.Writer) App

func (*Logic) Run

func (self *Logic) Run()

func (*Logic) SetAppConf

func (self *Logic) SetAppConf(k string, v interface{}) App

func (*Logic) SpiderPrepare

func (self *Logic) SpiderPrepare(original []*spider.Spider) App

func (*Logic) Status

func (self *Logic) Status() int

func (*Logic) Stop

func (self *Logic) Stop()

Directories

Path Synopsis
aid

Jump to

Keyboard shortcuts

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