Documentation
¶
Overview ¶
Package notify provides durable, rule-filtered owner notifications. Channel secrets never appear in API responses, delivery logs, or transport errors.
Index ¶
- Constants
- Variables
- type Channel
- type Event
- type Options
- type Service
- func (s *Service) Channels(ctx context.Context) ([]Channel, error)
- func (s *Service) Drain(ctx context.Context) error
- func (s *Service) Emit(ctx context.Context, e Event) error
- func (s *Service) Handler() http.Handler
- func (s *Service) ObserveIndexer(e newznab.Event)
- func (s *Service) ObservePlayback(ev playback.Event)
- func (s *Service) Run(ctx context.Context)
- func (s *Service) SampleHealth(ctx context.Context) error
- func (s *Service) Save(ctx context.Context, c Channel) error
- func (s *Service) TitleAvailable(ctx context.Context, title string) error
Constants ¶
View Source
const Redacted = "[configured]"
Variables ¶
View Source
var Kinds = []string{"playback.start", "playback.stop", "playback.error", "playback.failover", "provider.outage", "indexer.outage", "indexer.budget", "cache.full", "cert.renewed", "update.available", "user.joined", "title.available", "newsletter.weekly", "test"}
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct {
ID string `json:"id"`
Name string `json:"name"`
Kind string `json:"kind"`
Enabled bool `json:"enabled"`
Events []string `json:"events"`
Endpoint string `json:"endpoint"`
Token string `json:"token"`
Target string `json:"target"`
Username string `json:"username"`
Password string `json:"password"`
From string `json:"from"`
To string `json:"to"`
PerMinute int `json:"perMinute"`
DigestMinutes int `json:"digestMinutes"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ObserveIndexer ¶
func (*Service) ObservePlayback ¶
ObservePlayback only enqueues; network delivery runs separately in Run.
func (*Service) Run ¶
Run is the single queue consumer. Failed sends are recorded without automatic retry, avoiding duplicate delivery when an upstream timeout is ambiguous.
func (*Service) SampleHealth ¶
SampleHealth emits one alert on entering an unhealthy state, rather than one alert for every sample. Normal recovery allows a later outage to alert again.
Click to show internal directories.
Click to hide internal directories.