web

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

[spider frame (golang)] Pholcus(幽灵蛛)是一款纯Go语言编写的高并发、分布式、重量级爬虫软件,支持单机、服务端、客户端三种运行模式,拥有Web、GUI、命令行三种操作界面;规则简单灵活、批量任务并发、输出方式丰富(mysql/mongodb/csv/excel等)、有大量Demo共享;同时她还支持横纵向两种抓取模式,支持模拟登录和任务暂停、取消等一系列高级功能; (官方QQ群:Go大数据 42731170,欢迎加入我们的讨论)。 Web 界面版。

Index

Constants

This section is empty.

Variables

View Source
var (
	// Lsc log set
	Lsc = func() *LogSocketController {
		l := new(LogSocketController)
		l.connPool.Store(make(map[string]*ws.Conn))
		return l
	}()
)
View Source
var (
	Sc = &SocketController{
		connPool:  make(map[string]*ws.Conn),
		wchanPool: make(map[string]*Wchan),
	}
)

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func Flag

func Flag()

获取外部参数

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

func Router

func Router()

路由

func Run

func Run()

执行入口

Types

type LogSocketController

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

func (*LogSocketController) Add

func (self *LogSocketController) Add(sessID string, conn *ws.Conn)

func (*LogSocketController) Remove

func (self *LogSocketController) Remove(sessID string)

func (*LogSocketController) Write

func (self *LogSocketController) Write(p []byte) (int, error)

type SocketController

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

func (*SocketController) Add

func (self *SocketController) Add(sessID string, conn *ws.Conn)

func (*SocketController) GetConn

func (self *SocketController) GetConn(sessID string) *ws.Conn

func (*SocketController) GetWchan

func (self *SocketController) GetWchan(sessID string) *Wchan

func (*SocketController) Remove

func (self *SocketController) Remove(sessID string, conn *ws.Conn)

func (*SocketController) Write

func (self *SocketController) Write(sessID string, void map[string]interface{}, to ...int)

type Wchan

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

Jump to

Keyboard shortcuts

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