Documentation
¶
Index ¶
- type GroupStats
- type NNTPAdapter
- func (a *NNTPAdapter) GroupStats(ctx context.Context, group string) (GroupStats, error)
- func (a *NNTPAdapter) ID() string
- func (a *NNTPAdapter) XOver(ctx context.Context, group string, from, to int64) ([]OverviewHeader, error)
- func (a *NNTPAdapter) XOverOnProvider(ctx context.Context, providerID, group string, from, to int64) ([]OverviewHeader, string, error)
- func (a *NNTPAdapter) XOverWithProvider(ctx context.Context, group string, from, to int64) ([]OverviewHeader, string, error)
- type Options
- type OverviewHeader
- type RangeCoordinator
- type RangeDecision
- type RangeRequest
- type RangeResult
- type Service
- func (s *Service) RunBackfillOnce(ctx context.Context) error
- func (s *Service) RunBackfillOnceWithMetrics(ctx context.Context) (map[string]any, error)
- func (s *Service) RunDeferredOnceWithMetrics(ctx context.Context) (map[string]any, error)
- func (s *Service) RunLatestOnce(ctx context.Context) error
- func (s *Service) RunLatestOnceWithMetrics(ctx context.Context) (map[string]any, error)
- func (s *Service) RunOnce(ctx context.Context) error
- func (s *Service) RunTimeframesOnceWithMetrics(ctx context.Context) (map[string]any, error)
- type Timeframe
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupStats ¶
type NNTPAdapter ¶
type NNTPAdapter struct {
// contains filtered or unexported fields
}
func NewNNTPAdapter ¶
func NewNNTPAdapter(p nntpClient) *NNTPAdapter
func (*NNTPAdapter) GroupStats ¶
func (a *NNTPAdapter) GroupStats(ctx context.Context, group string) (GroupStats, error)
func (*NNTPAdapter) ID ¶
func (a *NNTPAdapter) ID() string
func (*NNTPAdapter) XOver ¶
func (a *NNTPAdapter) XOver(ctx context.Context, group string, from, to int64) ([]OverviewHeader, error)
func (*NNTPAdapter) XOverOnProvider ¶ added in v0.9.0
func (a *NNTPAdapter) XOverOnProvider(ctx context.Context, providerID, group string, from, to int64) ([]OverviewHeader, string, error)
func (*NNTPAdapter) XOverWithProvider ¶ added in v0.8.0
func (a *NNTPAdapter) XOverWithProvider(ctx context.Context, group string, from, to int64) ([]OverviewHeader, string, error)
type Options ¶
type Options struct {
Newsgroups []string
BatchSize int64
Concurrency int
MaxBatches int
MaxNewSourceDaysPerPass int
BackfillUntilDateByGroup map[string]time.Time
RangeCoordinator RangeCoordinator
RunObserver func(context.Context, map[string]any, error)
Timeframes []Timeframe
DeferredClaimOwner string
DeferredClaimLease time.Duration
DeferredMaxAttempts int
}
type OverviewHeader ¶
type RangeCoordinator ¶ added in v0.9.0
type RangeCoordinator interface {
BeginScrapeRange(ctx context.Context, request RangeRequest) (RangeDecision, error)
CompleteScrapeRange(ctx context.Context, decision RangeDecision, result RangeResult) error
FailScrapeRange(ctx context.Context, decision RangeDecision, cause error) error
}
type RangeDecision ¶ added in v0.9.0
type RangeRequest ¶ added in v0.9.0
type RangeResult ¶ added in v0.9.0
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) RunBackfillOnce ¶
backfill mode walks backward from the most recent known boundary.
func (*Service) RunBackfillOnceWithMetrics ¶ added in v0.7.0
func (*Service) RunDeferredOnceWithMetrics ¶ added in v0.9.0
func (*Service) RunLatestOnce ¶
latest mode prioritizes the head of the group and continues forward.
func (*Service) RunLatestOnceWithMetrics ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.