Documentation
¶
Index ¶
- type Job
- type JobManager
- func (m *JobManager) CancelAll()
- func (m *JobManager) CancelJob(jobID string) bool
- func (m *JobManager) CreateJob(siteKey string, incremental bool) (*Job, error)
- func (m *JobManager) GetContext(jobID string) context.Context
- func (m *JobManager) GetJob(jobID string) *Job
- func (m *JobManager) GetJobBySite(siteKey string) *Job
- func (m *JobManager) IsRunning(siteKey string) bool
- func (m *JobManager) ListJobs() []*Job
- func (m *JobManager) UpdateProgress(jobID string, processed, queued int64)
- func (m *JobManager) UpdateStatus(jobID string, status JobStatus, errorMsg string)
- type JobStatus
- type Server
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct {
ID string `json:"id"`
SiteKey string `json:"site_key"`
Status JobStatus `json:"status"`
StartedAt time.Time `json:"started_at"`
CompletedAt time.Time `json:"completed_at,omitempty"`
PagesProcessed int64 `json:"pages_processed"`
PagesQueued int64 `json:"pages_queued"`
ErrorMessage string `json:"error_message,omitempty"`
Incremental bool `json:"incremental"`
// contains filtered or unexported fields
}
Job represents a background crawl job
type JobManager ¶
type JobManager struct {
// contains filtered or unexported fields
}
JobManager manages background crawl jobs
func (*JobManager) CancelJob ¶
func (m *JobManager) CancelJob(jobID string) bool
CancelJob cancels a running job
func (*JobManager) CreateJob ¶
func (m *JobManager) CreateJob(siteKey string, incremental bool) (*Job, error)
CreateJob creates a new job for a site
func (*JobManager) GetContext ¶
func (m *JobManager) GetContext(jobID string) context.Context
GetContext returns the context for a job (for running the crawler)
func (*JobManager) GetJob ¶
func (m *JobManager) GetJob(jobID string) *Job
GetJob retrieves a job by ID
func (*JobManager) GetJobBySite ¶
func (m *JobManager) GetJobBySite(siteKey string) *Job
GetJobBySite retrieves the current job for a site
func (*JobManager) IsRunning ¶
func (m *JobManager) IsRunning(siteKey string) bool
IsRunning checks if a job is currently running for a site
func (*JobManager) UpdateProgress ¶
func (m *JobManager) UpdateProgress(jobID string, processed, queued int64)
UpdateProgress updates the progress counters of a job
func (*JobManager) UpdateStatus ¶
func (m *JobManager) UpdateStatus(jobID string, status JobStatus, errorMsg string)
UpdateStatus updates the status of a job
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wraps the MCP server with doc-scraper specific functionality
func NewServer ¶
func NewServer(cfg *ServerConfig) (*Server, error)
NewServer creates a new MCP server instance
Click to show internal directories.
Click to hide internal directories.