Documentation
¶
Index ¶
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 StageName ¶
type StageName string
const ( StageScrapeLatest StageName = "scrape_latest" StageScrapeBackfill StageName = "scrape_backfill" StageAssemble StageName = "assemble" StageAssembleLaneA StageName = "assemble_lane_a" StageAssembleLaneB StageName = "assemble_lane_b" StageRecoverYEnc StageName = "recover_yenc" StageRelease StageName = "release" 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" )
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
func New ¶
func New(log logger, stages []Stage, options ...Options) *Supervisor
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.