Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CachedRegistry ¶
type CachedRegistry struct {
// contains filtered or unexported fields
}
CachedRegistry wraps a SourceRegistry and adds caching functionality
func NewCachedRegistry ¶
func NewCachedRegistry(registry *Registry, logger *zerolog.Logger) *CachedRegistry
func (*CachedRegistry) FindByUID ¶
func (c *CachedRegistry) FindByUID(ctx context.Context, uid activitytypes.TypedUID) (types.Source, error)
FindByUID finds a source by UID with caching
func (*CachedRegistry) Initialize ¶
func (c *CachedRegistry) Initialize() error
func (*CachedRegistry) Search ¶
func (c *CachedRegistry) Search(ctx context.Context, params SearchRequest) ([]types.Source, error)
Search searches for sources with caching
type Config ¶
type Config struct {
MaxActivityProcessorConcurrency int `env:"MAX_ACTIVITY_PROCESSOR_CONCURRENCY,default=10"`
}
type ListRequest ¶
type ListRequest struct {
SourceUIDs []activitytypes.TypedUID
}
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages available source configurations through fetchers.
func NewRegistry ¶
func NewRegistry(logger *zerolog.Logger, sourceConfig *types.ProviderConfig) *Registry
func (*Registry) Initialize ¶
Initialize sets up the fetchers for each source type
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler manages the execution of active sources.
It is responsible for: - Initializing sources - Managing the lifecycle of polling sources - Scheduling the processing of activities
func NewScheduler ¶
func NewScheduler( logger *zerolog.Logger, sourceRepo sourceStore, activityRegistry *activities.Registry, config *Config, sourceConfig *sourcetypes.ProviderConfig, ) *Scheduler
func (*Scheduler) Add ¶
func (r *Scheduler) Add(source sourcetypes.Source) error
Add starts processing activities from the source.
func (*Scheduler) List ¶
func (r *Scheduler) List(req ListRequest) ([]sourcetypes.Source, error)
type SearchRequest ¶
SearchRequest configures how sources are searched and ranked.
Click to show internal directories.
Click to hide internal directories.