Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
Bus is a simple in-process publish/subscribe event bus.
type Event ¶
type Event struct {
Type Type `json:"type"`
Timestamp time.Time `json:"timestamp"`
ShowID string `json:"show_id,omitempty"`
EpisodeID string `json:"episode_id,omitempty"`
Data map[string]any `json:"data,omitempty"`
}
Event carries the context of something that happened.
type Type ¶
type Type string
Type identifies what happened.
const ( TypeShowAdded Type = "show_added" TypeShowDeleted Type = "show_deleted" TypeShowUpdated Type = "show_updated" TypeEpisodeGrabbed Type = "episode_grabbed" TypeGrabFailed Type = "grab_failed" TypeGrabStalled Type = "grab_stalled" // stallwatcher auto-blocklisted a grab TypeGrabStalledGaveUp Type = "grab_stalled_gave_up" // stall retry circuit breaker hit TypeAutoSearchRetry Type = "auto_search_retry" // stallwatcher asks the scheduler to re-search TypeDownloadDone Type = "download_done" TypeImportComplete Type = "import_complete" TypeImportFailed Type = "import_failed" TypeImportRetryNeeded Type = "import_retry_needed" // file-existence reconciler flipped has_file or found a completed-without-file grab TypeHealthIssue Type = "health_issue" TypeHealthOK Type = "health_ok" TypeTaskStarted Type = "task_started" TypeTaskFinished Type = "task_finished" )
Click to show internal directories.
Click to hide internal directories.