Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithHistoryFromDate ¶
WithHistoryFromDate sets the date from which to start fetching history. Default is the date 2 days ago.
func WithUpdateDiscardTimeout ¶
WithUpdateDiscardTimeout sets the timeout for discarding updates if UpdateChan() is full. Default is 0, meaning updates won't be discarded, but the whole processing may be blocked if receiver is too slow.
Types ¶
type AlertData ¶
type AlertData struct {
// contains filtered or unexported fields
}
AlertData holds the raid status information for all regions.
type Status ¶
type Status struct { Region region.ID Enabled bool UpdatedAt time.Time IsHistory bool // if this is true UpdatedAt may be inaccurate (zero) }
Status represents the alert status for a region.
type TgScraper ¶
type TgScraper struct {
// contains filtered or unexported fields
}
TgScraper is a struct that handles scraping alert status updates from a Telegram channel. It provides methods to run the scraper, retrieve alert data, and get real-time status updates.
func NewTgScraper ¶
NewTgScraper creates a TgScraper with the given TgClient and optional settings.
func (*TgScraper) UpdatesChan ¶
UpdatesChan returns a channel with real-time status updates.