Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EngineController ¶
type EngineController interface {
Start() error
Stop()
Pause()
Resume()
AddSeed(url string) error
GetState() string
GetStats() map[string]any
}
EngineController is the interface the API uses to control the engine.
type Job ¶
type Job struct {
ID string `json:"id"`
Status string `json:"status"`
Seeds []string `json:"seeds"`
Config map[string]any `json:"config,omitempty"`
StartedAt time.Time `json:"started_at"`
Stats map[string]any `json:"stats,omitempty"`
}
Job tracks a crawl job.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server provides a REST API for external control of the crawler.
func (*Server) SetEngine ¶
func (s *Server) SetEngine(engine EngineController)
SetEngine sets the engine controller.
Click to show internal directories.
Click to hide internal directories.