Documentation
¶
Index ¶
- type Options
- type ResultRunner
- type ResultRunnerFunc
- type Runner
- type RunnerFunc
- type Stage
- type StageGateDecision
- type StageGateFunc
- type StageName
- type Supervisor
- func (s *Supervisor) Run(ctx context.Context) error
- func (s *Supervisor) RunMaintenance(ctx context.Context) error
- func (s *Supervisor) RunPipeline(ctx context.Context) error
- func (s *Supervisor) RunSelected(ctx context.Context, names ...StageName) error
- func (s *Supervisor) RunStageOnce(ctx context.Context, name StageName) error
- func (s *Supervisor) RunStagesOnce(ctx context.Context, names ...StageName) error
- type Tracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResultRunner ¶
type ResultRunnerFunc ¶
type ResultRunnerFunc func(ctx context.Context) (json.RawMessage, error)
func (ResultRunnerFunc) RunResult ¶
func (fn ResultRunnerFunc) RunResult(ctx context.Context) (json.RawMessage, error)
type RunnerFunc ¶
type StageGateDecision ¶ added in v0.8.0
type StageGateFunc ¶ added in v0.8.0
type StageName ¶
type StageName string
const ( StageScrapeLatest StageName = "scrape_latest" StageScrapeBackfill StageName = "scrape_backfill" StagePosterMaterialize StageName = "poster_materialize" StageCrosspostPopularityRefresh StageName = "crosspost_popularity_refresh" StageArticleCohortSchedule StageName = "article_cohort_schedule" StageAssemble StageName = "assemble" StageRecoverYEnc StageName = "recover_yenc" StageReleaseSummaryRefresh StageName = "release_summary_refresh" StageRelease StageName = "release" StageReleaseGenerateNZB StageName = "release_generate_nzb" StageReleaseArchiveNZB StageName = "release_archive_nzb" StageReleasePurgeArchivedSources StageName = "release_purge_archived_sources" StageInspectDiscoveryReadyRefresh StageName = "inspect_discovery_ready_refresh" StageInspectPAR2ReadyRefresh StageName = "inspect_par2_ready_refresh" StageInspectArchiveReadyRefresh StageName = "inspect_archive_ready_refresh" StageInspectMediaReadyRefresh StageName = "inspect_media_ready_refresh" StageInspectDiscovery StageName = "inspect_discovery" StageInspectPAR2 StageName = "inspect_par2" StageInspectNFO StageName = "inspect_nfo" StageInspectArchive StageName = "inspect_archive" StageInspectPassword StageName = "inspect_password" StageInspectMedia StageName = "inspect_media" StageEnrichPreDB StageName = "enrich_predb" StageEnrichTMDB StageName = "enrich_tmdb" StageMaintenance StageName = "indexer_maintenance" StageMaintenanceReleaseSourcePurge StageName = "maintenance.release_source_purge" )
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
func New ¶
func New(log logger, stages []Stage, options ...Options) *Supervisor
func (*Supervisor) RunMaintenance ¶ added in v0.8.0
func (s *Supervisor) RunMaintenance(ctx context.Context) error
func (*Supervisor) RunPipeline ¶ added in v0.8.0
func (s *Supervisor) RunPipeline(ctx context.Context) error
func (*Supervisor) RunSelected ¶
func (s *Supervisor) RunSelected(ctx context.Context, names ...StageName) error
func (*Supervisor) RunStageOnce ¶
func (s *Supervisor) RunStageOnce(ctx context.Context, name StageName) error
func (*Supervisor) RunStagesOnce ¶
func (s *Supervisor) RunStagesOnce(ctx context.Context, names ...StageName) error
type Tracker ¶
type Tracker interface {
ClaimIndexerStage(ctx context.Context, req pgindex.IndexerStageClaimRequest) (*pgindex.IndexerStageClaimResult, error)
HeartbeatIndexerStageRun(ctx context.Context, runID int64, owner string, leaseDuration time.Duration) error
CompleteIndexerStageRun(ctx context.Context, req pgindex.IndexerStageFinishRequest) error
FailIndexerStageRun(ctx context.Context, req pgindex.IndexerStageFinishRequest) error
}
Click to show internal directories.
Click to hide internal directories.