rss

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package rss implements a gateway.NotificationAdapter that polls RSS 2.0 and Atom feeds on a configurable interval.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter implements gateway.NotificationAdapter for RSS/Atom feeds.

func New

func New(url string, intervalSeconds int) *Adapter

New creates an RSS adapter with the default name "rss".

func NewNamed

func NewNamed(name, url string, intervalSeconds int) *Adapter

NewNamed creates a named RSS adapter (e.g. "rss:blog").

func (*Adapter) Channels

func (a *Adapter) Channels() []gateway.ChannelInfo

Channels returns a single channel representing the feed.

func (*Adapter) HTTPHandler

func (a *Adapter) HTTPHandler() http.Handler

func (*Adapter) Name

func (a *Adapter) Name() string

func (*Adapter) Start

func (a *Adapter) Start(ctx context.Context, handler func(gateway.Notification)) error

Start polls the feed on the configured interval until ctx is canceled.

func (*Adapter) Status

func (a *Adapter) Status() gateway.AdapterStatus

Status returns connection state for the web UI.

func (*Adapter) Stop

func (a *Adapter) Stop() error

Stop is a no-op; cancellation is via context.

func (*Adapter) Type

func (a *Adapter) Type() gateway.AdapterType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL