Versions in this module Expand all Collapse all v0 v0.1.0 Aug 3, 2026 Changes in this version + type FetcherPlugin interface + Fetch func(ctx context.Context, req *types.Request) (*types.Response, error) + type HookPlugin interface + OnError func(err error) + OnItem func(item *types.Item) error + OnRequest func(req *types.Request) error + OnResponse func(resp *types.Response) error + OnStart func() error + OnStop func() error + type MiddlewarePlugin interface + Process func(item *types.Item) (*types.Item, error) + type ParserPlugin interface + Parse func(resp *types.Response, rules []config.ParseRule) ([]*types.Item, []string, error) + type Plugin interface + Close func() error + Init func(cfg map[string]any) error + Name func() string + Type func() PluginType + Version func() string + type PluginInfo struct + Name string + Type PluginType + Version string + type PluginType string + const PluginTypeFetcher + const PluginTypeHook + const PluginTypeMiddleware + const PluginTypeParser + const PluginTypeStorage + type Registry struct + func NewRegistry(logger *slog.Logger) *Registry + func (r *Registry) CloseAll() + func (r *Registry) Get(name string) (Plugin, bool) + func (r *Registry) GetByType(t PluginType) []Plugin + func (r *Registry) InitAll(configs map[string]map[string]any) error + func (r *Registry) List() []PluginInfo + func (r *Registry) Register(p Plugin) error + func (r *Registry) RunHooks(fn func(HookPlugin) error) + func (r *Registry) Unregister(name string) error + type StoragePlugin interface + Store func(items []*types.Item) error