web

package
v0.0.0-...-3a892f2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2017 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var Lsc = &LogSocketController{
	connPool: make(map[string]*ws.Conn),
	lvPool:   make(map[string]*LogView),
}
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, conn *ws.Conn)

func (*LogSocketController) Write

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

type LogView

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

设置所有log输出位置为Log

func (*LogView) Sprint

func (self *LogView) Sprint() string

func (*LogView) Write

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

type RuleController

type RuleController struct {
}

func (*RuleController) Testing

func (r *RuleController) Testing(w http.ResponseWriter, req *http.Request)

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