Documentation
¶
Index ¶
- Constants
- Variables
- func Register(handler Handler)
- type App
- type Handler
- type HandlerConfig
- type MaoDou
- func (this *MaoDou) Cawl(paras ...interface{}) (*Response, error)
- func (this *MaoDou) Config() *HandlerConfig
- func (this *MaoDou) Detail(resp *Response)
- func (this *MaoDou) Index(resp *Response)
- func (this *MaoDou) Init()
- func (this *MaoDou) Log(format string, a ...interface{})
- func (this *MaoDou) Result(result *models.Result)
- func (this *MaoDou) Route(http_method, route string, ...)
- func (this *MaoDou) Serve(ip string, port int, graceful_timeout int)
- func (this *MaoDou) SetDao(dao_name, dsn string)
- func (this *MaoDou) SetProxy(proxy_name, proxy_dsn string)
- func (this *MaoDou) SetRate(times ...time.Duration)
- func (this *MaoDou) SetServe(ip string, port int, graceful_timeout int)
- func (this *MaoDou) Start()
- type Request
- type Response
Constants ¶
View Source
const ( CAWL_NOPROXY = 0 CAWL_PROXY = 1 CAWL_RETRY = 2 )
Variables ¶
View Source
var CYEAM_LOG = `` /* 403-byte string literal not displayed */
Functions ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
var APP *App
func NewController ¶
type Handler ¶
type Handler interface {
Init()
Start()
Index(resp *Response)
Detail(resp *Response)
Result(result *models.Result)
Config() *HandlerConfig
Route(http_method, route string, function func(w http.ResponseWriter, req *http.Request))
Serve(ip string, port int, graceful_timeout int)
Log(format string, a ...interface{})
}
type HandlerConfig ¶
type HandlerConfig struct {
// contains filtered or unexported fields
}
type MaoDou ¶
type MaoDou struct {
Dao dao.DaoContainer
// supervisor *supervisor.SupervisorController
Debug bool
// contains filtered or unexported fields
}
func (*MaoDou) Config ¶
func (this *MaoDou) Config() *HandlerConfig
type Request ¶
type Request struct {
goreq.Request
Interval time.Duration
// contains filtered or unexported fields
}
func NewRequest ¶
func (*Request) DumpRequest ¶
Click to show internal directories.
Click to hide internal directories.